vb.net 2008-打开和关闭飞溅屏幕 [英] vb.net 2008 - turning splash screeen on and off

查看:84
本文介绍了vb.net 2008-打开和关闭飞溅屏幕的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

vb.net 2008/3.5

我当前的应用程序有一个初始屏幕.我也有用户偏好设置将其打开或关闭.但是我不知道在哪里放置处理开或关功能的代码.我尝试将其放在应用程序事件OnStartup中,但这没有用.偏好设置已按预期设置,但是当我这样做时,它什么也没做.初始屏幕仍然运行:

vb.net 2008 / 3.5

My current application has a splash screen. I also have a user preference for turning it on or off. But I cannot figure out where to put code that handles the on or off feature. I tried putting it in the application events OnStartup but that didn''t work. the preference variable is set as expected but when I did this it didn''t do anything. The splash screen still ran:

LoadUserPrefs()
If UserPrefs.ShowSplashOnStartup Then
    Application.SplashScreen = frmAbout
    Me.MinimumSplashScreenDisplayTime = 4000
Else
    Application.SplashScreen = Nothing
End If



我还在应用程序事件中的受保护的覆盖函数OnInitialize"中尝试了上面的代码.

上面的内容对启动屏幕是否运行都没有影响.

这种事情如何处理?

TIA为您提供帮助.



I also tried the above code in "Protected Overrides Function OnInitialize" in application events.

Neither of the above had any effect on whether or not the splash screen runs.

How is this sort of thing handled?

TIA for your help.

推荐答案

看看 [ ^ ]文章-此是VS2005,但它可以为您提供帮助.您可以尝试通过设计时属性本身来控制启动表单.
Have a look at this[^] article - this is VS2005 but it should help you out. You could try controlling your startup form through design time properties itself.


所需要做的就是在开发中的应用程序设置屏幕中取消设置初始屏幕.那一定是在上面覆盖我的代码.
All it took was un-setting the splash screen in the application settings screen in development. That must have been overriding my code above.


这篇关于vb.net 2008-打开和关闭飞溅屏幕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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