Results 1 to 7 of 7

Thread: [RESOLVED] Form Move Event

  1. #1

    Thread Starter
    Registered User
    Join Date
    Apr 2006
    Posts
    62

    Resolved [RESOLVED] Form Move Event

    Hi, what event fires when you move the form around the screen? I've noticed there is no Form_Move.

    What I'm ultimately trying to do is have one form which I can move, but I want it to also move another form in unison with this form.

    Thanks!

  2. #2
    Frenzied Member Andrew G's Avatar
    Join Date
    Nov 2005
    Location
    Sydney
    Posts
    1,587

    Re: Form Move Event

    Do you mean this?
    VB Code:
    1. Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    2.  
    3. End Sub

  3. #3

    Thread Starter
    Registered User
    Join Date
    Apr 2006
    Posts
    62

    Re: Form Move Event

    No, I mean like when you click the title bar of a form to move it around the screen.

  4. #4
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: Form Move Event

    i think that's the MouseMove Event.

    but what you are trying to do, is not really possible with such events.

    take a look at this Example by Karl Peterson
    Show Appreciation. Rate Posts.

  5. #5
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: Form Move Event

    You would need to subclass your form and look for the WM_MOVING message.

    alternatively you could do something using timers. Here's a link to an example of getting a MoveFinshed / ResizeFinished event using timers - it could be modified specifically for a form moving event: http://www.vbforums.com/showpost.php...59&postcount=6

  6. #6

    Thread Starter
    Registered User
    Join Date
    Apr 2006
    Posts
    62

    Re: Form Move Event

    I'll give subclassing a shot. It's probably the best way to do it, right?

    Anyways, thanks for the replies.

  7. #7
    Frenzied Member Andrew G's Avatar
    Join Date
    Nov 2005
    Location
    Sydney
    Posts
    1,587

    Re: [RESOLVED] Form Move Event

    Heres and example of subclassing
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width