, i actually posted this last time but i didnt got a good answers, but anyways i was trying to drag the button1 to picturebox1 inorder for the picturebox2 to show,.. heres the code that i did..
Dim offset As Point
Private Sub button1_MouseDown(ByVal sender As Object, ByVal e As MouseEventArgs) Handles Button1.MouseDown
offset = New Point(-e.X, -e.Y)
End Sub
Private Sub button1_MouseMove(ByVal sender As Object, ByVal e As MouseEventArgs) Handles Button1.MouseMove
If e.Button = Windows.Forms.MouseButtons.Left Then
Dim Pos As Point = Me.PointToClient(MousePosition)
Pos.Offset(offset.X, offset.Y)
Button1.Location = Pos
End If
If Button1.Location = PictureBox1.Location then
picturebox2.show
End If
End Sub
as u can see, i used .location inorder for the picturebox2 to show,
NOTE: I NEED TO PLACE THE BUTTON1 TO THE EXACT LOCATION OF PICTUREBOX1.
i really need a code that if the button1 touched the picturebox1 (any location aslong as it touches the said picturebox) then picturebox2 automaically show
again, i hope u got my point, please help... :wave::wave::wave::wave:paul, i will wait for your reply as well as the others:wave::wave::wave::wave:
thnx thnx thnx
Quote:
Dim offset As Point
Private Sub button1_MouseDown(ByVal sender As Object, ByVal e As MouseEventArgs) Handles Button1.MouseDown
offset = New Point(-e.X, -e.Y)
End Sub
Private Sub button1_MouseMove(ByVal sender As Object, ByVal e As MouseEventArgs) Handles Button1.MouseMove
If e.Button = Windows.Forms.MouseButtons.Left Then
Dim Pos As Point = Me.PointToClient(MousePosition)
Pos.Offset(offset.X, offset.Y)
Button1.Location = Pos
End If
If Button1.Location = PictureBox1.Location then
picturebox2.show
End If
End Sub
NOTE: I NEED TO PLACE THE BUTTON1 TO THE EXACT LOCATION OF PICTUREBOX1.
i really need a code that if the button1 touched the picturebox1 (any location aslong as it touches the said picturebox) then picturebox2 automaically show
again, i hope u got my point, please help... :wave::wave::wave::wave:paul, i will wait for your reply as well as the others:wave::wave::wave::wave:
thnx thnx thnx