
Problem showing a Splash Form and then a Main Form (The Main form does not get control.)
Since you seem already able to show your main form in sub main I
haven't showed it to you again. But if you really need it:
Sub Main
Dim frmMain as new frmMain()
frmMain.ShowDialog
End Sub
' Next code in go frmMain
Private Sub frmMain_Load
me.hide
Dim frmWelcome as new frmWelcome()
frmWelcome.Show
' Initialize main form
frmWelcome.Hide
me.show
End Sub
Dick?
On Wed, 5 Dec 2001 15:22:29 -0500, "dick barney"
Quote:
>Benoit,
>Thank you for what you showed me but it is slightly different from what I
>was doing. My program started in the Sub Main() and you are showing me the
>load event of a form called frmMain. But I am glad to know your
>information.
>thanku........dick
>> I do something like that
>> Private Sub frmMain_Load
>> me.hide
>> frmWelcome.Show
>> ' Initialize main form
>> frmWelcome.Hide
>> me.show
>> End Sub
>> So the splash will dissapear only when the main form is fully
>> initialized.
>> On Wed, 5 Dec 2001 11:56:25 -0500, "dick barney"
>> >I am attempting to show a Splash form and then goto the Main form. The
>> >program shows the Splash form, hides the Splash form, show the Main form
>> >and then continues on to end the program. How do I pass program control
>to
>> >the Main form?
>> >In VB6, I would do
>> >Sub Main
>> > starttime = dateadd("s",3,now())
>> > frmWelcome.Show
>> > while now < starttime
>> > doevents
>> > wend
>> > frmWelcome.Hide
>> > frmMain.Show
>> >End Sub
>> >In VB.NET I have
>> >Public Welcome as new MyApp.frmWelcome()
>> >Public MainForm as new MyApp.frmMain()
>> >Sub Main
>> > Dim starttime as date
>> > starttime = dateadd("s",3,now())
>> > Welcome.Show
>> > while now < starttime
>> > application.doevents()
>> > wend
>> > Welcome.Hide()
>> > Main.Show()
>> >end Sub