|
-
Sep 27th, 2002, 10:12 AM
#1
Thread Starter
New Member
Unloading Startup Forms
I have an application that starts with a login screen ... which passes the login values to a main form. How can I, after the values have been passed to the main form is loaded, unload the login screen without terminating the entire application?
Thanks,
JH
-
Sep 27th, 2002, 10:15 AM
#2
Addicted Member
me.close after you have past the values back
Wind and waves resolves all problems.
-
Sep 27th, 2002, 10:34 AM
#3
Addicted Member
Originally posted by cim3
me.close after you have past the values back
I can't be sure, but I think that if you close the startup object, the rest of the application will:
A) Close
or
B) Crash when you try to access other objects
I think you'll need to use the Application.Run method. See help for all of its permutations.
-
Sep 27th, 2002, 12:18 PM
#4
yay gay
then open the other form before closing the 1st one..lol
-
Sep 30th, 2002, 11:17 AM
#5
Addicted Member
Originally posted by PT Exorcist
then open the other form before closing the 1st one..lol
Have you used .NET? It's not like VB. If you unload the startup object, it does as I explained!
-
Sep 30th, 2002, 05:31 PM
#6
PowerPoster
I believe your going to want to start your app with a main sub. Set it as the startup in the properties of the project. In that sub, you can load up the forms you will be using, and show them or unload them as you need. Once the main sub returns though, the application will end.
-
Sep 30th, 2002, 08:01 PM
#7
-
Sep 30th, 2002, 08:41 PM
#8
PowerPoster
Nice recap of my post
-
Oct 1st, 2002, 02:15 AM
#9
Addicted Member
Have you guys even tried this, or are you guessing based on your experience with VB6- ? In my experience, unless you use Application.Run, even Sub Main will asynchronously load forms and then exit, or crash if you try to access an object, once it is done.
-
Oct 1st, 2002, 08:52 AM
#10
PowerPoster
This works:
Code:
Public Class Class1
Public Sub class1()
End Sub
Public Shared Sub Main()
Dim cl As New Class1()
cl.run()
End Sub
Private Sub run()
Dim ftemp As New Form1()
ftemp.ShowDialog()
End Sub
End Class
Although, you have to show the form as showdialog not show.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|