My.Application.MinimumSplashScreenDisplayTime does not delay the main form load
-
I am attempting to display a splash screen and delay the main form load by following the Microsoft instructions and am getting nowhere. I can always MAKE it work by treating the Splash Screen as the startup form and opening the main form from there but I would like to get the instructions that I found to work since it is supposed to be SOOOOOO simple. :) I have tried the code listed on MSDN[^] for this and it doesnt work like it is described. I found a thread on another forum that said to put the code in the Sub New of the Splash Screen code instead of the application code. Note, this is a 2.0 project that I set to compile in 3.5 in Visual Studio 2008. I dont know if that has something to do with the Splash Screen issue or not.
CleaKO
"Now, a man would have opened both gates, driven through and not bothered to close either gate." - Marc Clifton (The Lounge)
-
I am attempting to display a splash screen and delay the main form load by following the Microsoft instructions and am getting nowhere. I can always MAKE it work by treating the Splash Screen as the startup form and opening the main form from there but I would like to get the instructions that I found to work since it is supposed to be SOOOOOO simple. :) I have tried the code listed on MSDN[^] for this and it doesnt work like it is described. I found a thread on another forum that said to put the code in the Sub New of the Splash Screen code instead of the application code. Note, this is a 2.0 project that I set to compile in 3.5 in Visual Studio 2008. I dont know if that has something to do with the Splash Screen issue or not.
CleaKO
"Now, a man would have opened both gates, driven through and not bothered to close either gate." - Marc Clifton (The Lounge)
-
That's strange, I'll try again. http://msdn.microsoft.com/en-us/library/microsoft.visualbasic.applicationservices.windowsformsapplicationbase.minimumsplashscreendisplaytime(VS.85).aspx[^]
CleaKO
"Now, a man would have opened both gates, driven through and not bothered to close either gate." - Marc Clifton (The Lounge)
-
That's strange, I'll try again. http://msdn.microsoft.com/en-us/library/microsoft.visualbasic.applicationservices.windowsformsapplicationbase.minimumsplashscreendisplaytime(VS.85).aspx[^]
CleaKO
"Now, a man would have opened both gates, driven through and not bothered to close either gate." - Marc Clifton (The Lounge)
Thanks. I added a splash screen and a form to my project, set the splash screen in the project's properties, and added the following code to the ApplicationEvents.vb:
Protected Overrides Function OnInitialize(ByVal commandLineArgs As _
System.Collections.ObjectModel.ReadOnlyCollection(Of String)) As Boolean
Me.MinimumSplashScreenDisplayTime = 5000
Return MyBase.OnInitialize(commandLineArgs)
End FunctionAnd it worked correctly. :) The splash screen was shown for 5 seconds. I targed .Net 3.5, too. I'm sure this isn't helpful but I just wanted to confirm for you that the code on that MSDN page did work so you might want to double-check your code.