Results 1 to 10 of 10

Thread: Loading and Unloading forms (Resolved!)

Threaded View

  1. #1

    Thread Starter
    Still learning kebo's Avatar
    Join Date
    Apr 2004
    Location
    Gardnerville,nv
    Posts
    3,762

    Loading and Unloading forms (Resolved!)

    I have an app that starts in Sub Main by checking to see if the app is already running, and if not, it loads the splash form
    Code:
    Private Sub Main()
        If App.PrevInstance Then
            End
        Else
            frmSplash.Show
        End If
    End Sub
    the splash form will hide after 10 seconds or if the user clicks on it, and then Loads MainForm---

    Code:
    Private Sub Form_Load()
    
    'do a bunch of waiting and stuff
        Load Mainfrm
    End Sub
    and in the Load MainForm event I unload frmSplash
    Code:
     
    
    Private Sub Form_Load()
        Unload frmSplash
      
       'do a bunch more stuff
    
    End Sub
    my problem is that Sub Main never completes and when I unload frmSplash, I get an "Object was Unloaded error"
    How do I get around this, OnError Resume Next??????

    kevin
    Last edited by kebo; May 25th, 2004 at 09:58 AM.
    Process control doesn't give you good quality, it gives you consistent quality.
    Good quality comes from consistently doing the right things.

    Vague general questions have vague general answers.
    A $100 donation is required for me to help you if you PM me asking for help. Instructions for donating to one of our local charities will be provided.

    ______________________________
    Last edited by kebo : Now. Reason: superfluous typo's

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