How to create a splash screen.
Posted on July 6, 2011
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | 'Forms - How to create a splash screen. 'Put the following code in a standard code module Public Sub Main() ' begin application with splash screen frmSplash.Show End Sub Public Sub UnloadSplash() 'remove splash and show main form frmMain.Show Unload frmSplash End Sub 'Code for Splash screen is as follows: 'Unload Splash screen if user presses a key Private Sub Form_KeyPress(KeyAscii As Integer) UnloadSplash End Sub Private Sub Form_Load() lblVersion.Caption = "Version " & App.Major & "." & App.Minor & "." & App.Revision lblAppTitle.Caption = App.Title End Sub 'Unload Splash screen when user clicks on it Private Sub Form1_Click() UnloadSplash End Sub 'Set timer to unload splash screen after a certain time frame. Private Sub Timer1_Timer() UnloadSplash End Sub |