Jump to content
Fórum Script Brasil
  • 0

Mover Form Clicando Em Uma Figura


Guest --marcio --
 Share

Question

2 answers to this question

Recommended Posts

  • 0
Public Class PictureBox1

Structure MoveForm

Dim X As Integer

Dim Y As Integer

End Structure

Dim mv As MoveForm

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

If e.Button <> Windows.Forms.MouseButtons.Left Then Exit Sub

mv.X = Me.Left - MousePosition.X

mv.Y = Me.Top - MousePosition.Y

End Sub

Private Sub PictureBox1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseMove

If e.Button <> Windows.Forms.MouseButtons.Left Then Exit Sub

Me.Left = mv.X + MousePosition.X

Me.Top = mv.Y + MousePosition.Y

End Sub

Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click

End Sub

End Class

olha como coloquei o codigo ..

mas ele so move se eu clicar no form e não na figura.

sera que ta errado?

cacela a explicacao .. botei meus neuronios a funciona e deu certo...... valeuuuuuuuuuuuuuuuuuu

Link to comment
Share on other sites

Join the conversation

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

Guest
Answer this question...

×   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.

 Share



  • Forum Statistics

    • Total Topics
      150.2k
    • Total Posts
      647.5k
×
×
  • Create New...