Results 1 to 5 of 5

Thread: How do I get the new form to pop up where the last on ended up???

  1. #1

    Thread Starter
    Fanatic Member mikeycorn's Avatar
    Join Date
    Jun 2000
    Location
    Aliso Viejo, CA, USA
    Posts
    526
    How can I make it so that one form unloads and the next one is shown, the next one opens at the same spot that the user left the last one? I'd like my file open common dialog box to do the same.


    mikeycorn

  2. #2
    Fanatic Member
    Join Date
    Mar 2000
    Location
    That posh bit of England known as Buckinghamshire
    Posts
    658
    Where you are showing the new form, and unloading the old one.

    Code:
        frmNew.Show
        frmNew.Top = frmOld.Top
        frmNew.Left = frmOld.Left
    
        Unload frmOld
    Iain, thats with an i by the way!

  3. #3
    Guest
    Place your code in the Unload event of the Form.

    Code:
    Private Sub Form_Unload(Cancel As Integer)
    
        Form2.Left = Me.Left
        Form2.Top = Me.Top
        Form2.Show
        
    End Sub

  4. #4

    Thread Starter
    Fanatic Member mikeycorn's Avatar
    Join Date
    Jun 2000
    Location
    Aliso Viejo, CA, USA
    Posts
    526
    Excellent!!! Hey, by the way, what 's the difference between "Load frmQuizBackground" & "frmQuizBackground.Show"?


    mikeycorn

  5. #5
    Guest
    Load frmQuizBackground will only trigger the Load event of the Form. Show frmQuizBackground does the actual showing of the Form.

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