简体   繁体   English

Visual Basic表单应用程序自定义关闭按钮

[英]Visual Basic Form Application custom close button

I created a new UI style like Visual Studios 2012 (the upper line with close button for example) 我创建了一个新的UI样式,如Visual Studios 2012(例如,上面一行有关闭按钮)

Now I try to close the application when I click on it (hovering works fine) but when I click on it the form closes, but the program doesn't stop debugging. 现在我尝试在单击它时关闭应用程序(悬停工作正常)但是当我单击它时表单关闭,但程序不会停止调试。

Is there any way I can make the program stop debugging? 有什么办法可以让程序停止调试吗?

Me.Close(), Application.Exit() and Application.ExitThread() does not work. Me.Close(),Application.Exit()和Application.ExitThread() 工作。

Have a look in your Project Properties Menu. 查看“项目属性”菜单。 There is the option to choose when the program ends. 可以选择程序何时结束。 Options will be like, "First Form Opened Closes", "Last Form Closes" ect. 选项将类似于“First Form Opened Closes”,“Last Form Closes”等。

It may be that you have opened another form and only Hidden it, not closed it. 可能是您打开了另一个表单而只是隐藏它,而不是关闭它。 Hence it is still open and the application will not close. 因此它仍然是开放的,应用程序将不会关闭。

Alternatively, just type the word "End" that will force the program to close 或者,只需键入将强制程序关闭的单词“End”

Regards 问候

Joe

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

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