问题描述
我在VB 2010 Express中的启动画面出现了一些问题.屏幕按照预期的方式显示,并且一切正常,但是无论我将计时器的interval属性更改为什么,屏幕在约4秒钟后仍会消失.我需要至少停留10分钟.一些帮助会得到应用!
I''ve got some issues with my Splash Screen in VB 2010 Express. The screen shows up like it''s supposed to, and everything works, but no matter what I change the timer''s interval property to, the screen still goes away after about 4 seconds. I need it to stay for at least 10. Some help would be appriciated!
推荐答案
Protected Overrides Function OnInitialize(commandLineArgs As System.Collections.ObjectModel.ReadOnlyCollection(Of String)) As Boolean
Me.MinimumSplashScreenDisplayTime = 10000
Return MyBase.OnInitialize(commandLineArgs)
End Function
我在这里找到该信息后尝试了此操作: http://www.sourcecodester .com/tutorials/net/how-create-a-splash-screen-vbnet.html
ApplicationEvents.vb文件应如下所示:
I tried this after finding that info here: http://www.sourcecodester.com/tutorials/net/how-create-a-splash-screen-vbnet.html
The ApplicationEvents.vb file should look like this:
Namespace My
' The following events are available for MyApplication:
'
' Startup: Raised when the application starts, before the startup form is created.
' Shutdown: Raised after all application forms are closed. This event is not raised if the application terminates abnormally.
' UnhandledException: Raised if the application encounters an unhandled exception.
' StartupNextInstance: Raised when launching a single-instance application and the application is already active.
' NetworkAvailabilityChanged: Raised when the network connection is connected or disconnected.
Partial Friend Class MyApplication
Protected Overrides Function OnInitialize(commandLineArgs As System.Collections.ObjectModel.ReadOnlyCollection(Of String)) As Boolean
Me.MinimumSplashScreenDisplayTime = 10000
Return MyBase.OnInitialize(commandLineArgs)
End Function
End Class
End Namespace
这篇关于VB 2010启动画面问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!