Setting splash screen time
I'm trying to set the splash screen minimum display time per https://learn.microsoft.com/en-us/do...owsdesktop-8.0
Where do I put this code?
Code:
Protected Overrides Function OnInitialize(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
I tried it in my main form & in ApplicationEvents & both give me errors...
Re: Setting splash screen time
Did you keep reading? Because it tells you where: (emphasis mine)....
Quote:
You should set the My.Application.MinimumSplashScreenDisplayTime property in a method that overrides the OnInitialize or OnCreateSplashScreen method. Code that overrides methods of the WindowsFormsApplicationBase class should be entered in the ApplicationEvents.vb file, which is hidden by default.
And then provides instructions for getting to the hidden file:
Quote:
To access the Code Editor window for overriding members
1. With a project selected in Solution Explorer, click Properties on the Project menu.
2. Click the Application tab.
3. Click the View Application Events button to open the Code Editor.
-tg
Re: Setting splash screen time
Quote:
Originally Posted by
nbrege
I tried it in my main form & in ApplicationEvents & both give me errors...
The first option is obviously wrong, as per the documentation quoted by tg, but it sounds like the second may be correct. Alas, I just can't think of a way that we could ever discover what those errors actually were in order to diagnose the issue. If only there was someone who had that information already and could provide it to us.