VB 2010启动画面问题 [英] VB 2010 Splash Screen Issue

查看:71
本文介绍了VB 2010启动画面问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在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!

推荐答案

您在另一个答案下写的那条评论中,您似乎正在关闭主窗体,然后打开主窗体(即,而不是关闭启动屏幕).要更改启动屏幕的持续时间,请转到应用程序"选项卡,然后单击查看应用程序事件".您将看到My​​Application类.在其中添加以下功能:
In that comment you wrote under the other answer, it looks like you are closing the main form and then opening the main form (i.e., rather than closing the splash screen). To change the duration of the splash screen, go to the Application tab and click "View Application Events". You will see the MyApplication class. In it, add the following function:
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启动画面问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆