Results 1 to 5 of 5

Thread: aborting application loading...

  1. #1

    Thread Starter
    Guru Yonatan's Avatar
    Join Date
    Apr 1999
    Location
    Israel
    Posts
    892

    Post

    Try this:

    Set Me = Nothing
    End


    ------------------
    Yonatan
    Teenage Programmer
    E-Mail: [email protected]
    ICQ: 19552879



  2. #2
    Hyperactive Member
    Join Date
    Jul 1999
    Location
    NY, USA
    Posts
    270

    Post

    Use a Sub Main and then never load the forms if you don't have to.

    ------------------
    Tom Young, 14 Year Old
    [email protected]
    ICQ: 15743470
    AIM: TomY10
    PERL, JavaScript and VB Programmer

  3. #3
    Member
    Join Date
    Jun 1999
    Posts
    38

    Post

    what do you mean by use Sub Main?
    how do i stop the main form from loading?

    even if i exit the initialize sub Form_Load will still be called and the form will still load.

    ------------------
    I swear you guys rip on me 13 or 14 more times, i'm outta here...


  4. #4
    Member
    Join Date
    Jun 1999
    Posts
    38

    Post

    my main forms Form_Initialize event reads some text files and loads information from them, if the files cannot be found i want to abort and exit, however unload me does not work until the form is completely loaded...



    ------------------
    I swear you guys rip on me 13 or 14 more times, i'm outta here...


  5. #5
    Fanatic Member
    Join Date
    Oct 1999
    Location
    MA, USA
    Posts
    523

    Post

    Sub Main refers to Project - StartUp object (Project-->Project Properties Menu). If you change StartUp object to Sub Main you need to add this code to one of your modules:
    Code:
    Sub Main()
        'put what you want program to do
        'before anything is being loaded
    End Sub
    Example:
    This code will run program only if date is 01/01/2000. Put this code in a Module
    Code:
    Sub Main()
        If Date=#01/01/00# Then
            Form1.Show
            'Form1 is being loaded
        Else
            MsgBox "Today is not 01/01/2000"
            'at this point program stops
        End If
    End Sub
    Hope this will help

    ------------------
    Visual Basic Programmer (at least I want to be one)
    ------------------
    PolComSoft
    You will hear a lot about it.

    [This message has been edited by QWERTY (edited 11-07-1999).]

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