开发者

Can't run Startup form

开发者 https://www.devze.com 2023-03-07 14:05 出处:网络
As usual, I change the startup form under Application tab. At this time, it doesn\'t run my selected Startup form. Whatever I set to any forms or even excluding t开发者_如何学Gohat form, it still runs

As usual, I change the startup form under Application tab. At this time, it doesn't run my selected Startup form. Whatever I set to any forms or even excluding t开发者_如何学Gohat form, it still runs the same form. Why does it happen?


Try deleting .pdb file in debug directory and start with Build > Clean [Your SolutionName]


Check the <MainForm> element in <project>\My Project\Application.myapp.

If it's still not working right then check the code in <project>\My Project\Application.Designer.vb and look at the sub OnCreateMainForm. This is where the form is assigned to the main form property of the application.

Protected Overrides Sub OnCreateMainForm()
    Me.MainForm = Global.<ApplicationName>.<FormName>
End Sub


Just rebuilding the project will do the trick


try to delete the \bin and \obj directories. Then clean & rebuild.

0

精彩评论

暂无评论...
验证码 换一张
取 消