|
-
Apr 30th, 2010, 03:37 PM
#1
Addicted Member
Re: Moving a Borderless form, simple & short.
Private Sub PictureBox5_MouseHover(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox5.MouseHover
drag = True
mousex = Windows.Forms.Cursor.Position.X - Me.Left
mousey = Windows.Forms.Cursor.Position.Y - Me.Top
If drag Then
Me.Top = Windows.Forms.Cursor.Position.Y - mousey
Me.Left = Windows.Forms.Cursor.Position.X - mousex
End If
End Sub
Actually, I was mistaken. it won't move at all, i guess the reason it moved, is because i hadn't deleted ur code. so till the form1_mousemove was there it would move as I explained, now that I deleted the code in form1_mousemove it won't move at all. same thing happens in picturebox_click
EDIT:
your last comment finally made me understand where my mistake stood, i wasn't putting the code under the correct properties. I finally made it thanks for your comment again, it made me understand.
Last edited by Legjendat; Apr 30th, 2010 at 03:59 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|