简体   繁体   English

生成后,Visual Studio 2008将不会运行最新的代码

[英]Visual Studio 2008 won't run latest code after Build

I have a VS 2008 Windows Forms application written in VB, and have built a Splash screen that I'd like to show for 2-3 seconds before the main window is displayed. 我有一个用VB编写的VS 2008 Windows Forms应用程序,并构建了一个Splash屏幕,在显示主窗口之前,我希望该屏幕显示2-3秒。

In the Application Events I have added code to the OnInitialize event (in the namespace My ), and set the MinimumSplashScreenDisplayTime to 3000 milliseconds. 应用程序事件中,我已将代码添加到OnInitialize事件(在名称空间My中 ),并将MinimumSplashScreenDisplayTime设置为3000毫秒。

My issue is that even though VS builds the code without erros, what happens is the Main window is displayed with the Splash Screen (modeless, allowing clicks on the main window menu) in front of it for a few seconds. 我的问题是,即使VS生成的代码没有错误,但发生的情况是在主窗口的前面显示了启动屏幕(无模式,允许单击主窗口菜单)。

I thought I had done everything right, so how can I force VS 2008 to run the latest code base ? 我以为我做对了所有事情,那么如何强制VS 2008运行最新的代码库

And how can I prevent the MainWindow from showing until the Splash screen is unloaded? 并且如何防止在启动屏幕卸载之前显示MainWindow?

In the properties for the project choose your custom splash screen as splashscreen object for the project. 在项目的属性中,选择您的自定义启动屏幕作为该项目的启动屏幕对象。 This should automatically use your splash screen as the project's splash. 这应该自动将您的启动画面用作项目的启动画面。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM