-
Quick question.... In creating a program off of the wizard supplied in VB 6, there is a splash screen that is created. In running the program though, that splash screen doesn't stay on the screen long enough to even be noticed. Is there any way that I can keep that screen up, say, 2 more seconds so that it can be looked at before the program proceeds to the main form?
Thanks for your help!!
~Brian
-
I have marked changed places with '//
Code:
Public fMainForm As frmMain
Private Declare Function GetTickCount Lib "kernel32" () As Long '//
Sub Main()
Dim OldTime As Long '//
frmSplash.Show
frmSplash.Refresh
OldTime = GetTickCount '//
Do While ((OldTime + 2000) > GetTickCount) '//
DoEvents '//
Loop '//
Set fMainForm = New frmMain
Load fMainForm
Unload frmSplash
fMainForm.Show
End Sub
Changes 2000 to 1000 if you want.
I hope this helps,
Moi
-
So wait,
Does this code go behind the splash screen form load? Or behind my main form?
This is the only coding behind my splash screen...
Private Sub Form_Load()
lblVersion.Caption = "Version " & App.Major & "." & App.Minor & "." & App.Revision
End Sub
Thanks for your help on this!
~Brian
-
-
hee hee.. Thanks. After that post I felt a little too *new* to the whole VB thing... But I guess that is how you figure it out, and get better....
~brian