Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I want to do something, like I have a image, displayed in picturebox, If the click mouse on the forum, the image should move to that place where I clicked the mouse.

 

I have written the following code.

but it is not displaying.

 

Private Sub Form1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseDown

 

Dim pic As New System.Windows.Forms.PictureBox()

Dim resources As System.Resources.ResourceManager = new System.Resources.ResourceManager(GetType(Form1))

 

pic.Location = New System.Drawing.Point(e.X, e.Y)

pic.Size = New System.Drawing.Size(104, 80)

 

pic.Image = CType(resources.GetObject("j:\shooter.jpg"),_ System.Drawing.Bitmap)

 

pic.Visible = True

 

End Sub

 

 

can any one help.

 

Or is there anyother way to do this.

Rufus

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...