How do I change the duration of a splash screen?

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

I'm using VB 2005 Express Edition, and I have added a splash screen using
the template provided. I have also identified it in the "Project /
Properties / Application" panel.

Works like a champ.

I would like to change the duration, but I can't find anything in the
properties, or the code where I can change it.

Thoughts?
 
Try the following in the load event of the splash screen.


My.Application.MinimumSplashScreenDisplayTime = 4000

Lloyd Sheen
 
Dave,

If Lloyd's suggestion works for you then it is simpler than my suggestion.
If his suggestion does not work for you:

Select the project in Solution Explorer, and then on the Project menu, click
Properties.

Select the Application page.

Click the View Application Events button to open the Code Editor.

Within the MyApplication class, add this code:

Protected Overrides Function OnInitialize( _
ByVal commandLineArgs As _
System.Collections.ObjectModel.ReadOnlyCollection(Of String) _
) As Boolean
' Set the display time to 5000 milliseconds (5 seconds).
Me.MinimumSplashScreenDisplayTime = 5000
Return MyBase.OnInitialize(commandLineArgs)
End Function

You can change the minimum splash screen display time by specifying the
number of milliseconds for the form to remain on screen.

Kerry Moorman
 
Dave,

I don't know how the splash screen is showed, but the most easy method to
set a wait time is

threading.thread.sleep(milliseconds)

Be aware that this is typed in the message so there can be typos.

Cor
 
Back
Top