PDA

Click to See Complete Forum and Search --> : aborting application loading...


Yonatan
Nov 6th, 1999, 12:12 AM
Try this:

Set Me = Nothing
End

------------------
Yonatan
Teenage Programmer
E-Mail: RZvika@netvision.net.il
ICQ: 19552879 (http://www.icq.com/19552879)

Compwiz
Nov 6th, 1999, 01:07 AM
Use a Sub Main and then never load the forms if you don't have to.

------------------
Tom Young, 14 Year Old
tyoung@stny.rr.com
ICQ: 15743470
AIM: TomY10
PERL, JavaScript and VB Programmer

Howard Stern
Nov 6th, 1999, 01:50 AM
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...

Howard Stern
Nov 6th, 1999, 11:33 AM
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...

QWERTY
Nov 6th, 1999, 02:33 PM
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:

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

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).]