|
-
Dec 29th, 2023, 01:10 PM
#1
Thread Starter
Frenzied Member
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...
Last edited by nbrege; Dec 29th, 2023 at 01:14 PM.
-
Dec 29th, 2023, 02:59 PM
#2
Re: Setting splash screen time
Did you keep reading? Because it tells you where: (emphasis mine)....
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:
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
-
Dec 29th, 2023, 08:42 PM
#3
Re: Setting splash screen time
 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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|