MSFN Forum: Move form on click and drag - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Move form on click and drag Rate Topic: -----

#1 User is offline   MonkH 

  • Group: Members
  • Posts: 5
  • Joined: 22-May 05

  Posted 28 May 2005 - 01:49 PM

anyone have an idea how to move a form when u click and drag it? i tryed google couldnt think anythink to put and came up with all the wrong stuff

atm i got

      
    Private Sub Form1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseDown
        Me.Location = New Point(Control.MousePosition.X - 100, Control.MousePosition.Y - 100)

    End Sub


it just moves the form once i was thinking of changing the 100
(Me.Location = New Point(Control.MousePosition.X - 100, Control.MousePosition.Y - 100) to the mouse position on the form but wasnt sure how to do that any ideas how to do that also?


Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy