vb.net Visual Basic 窗体应用程序自定义关闭按钮
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/15951999/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Visual Basic Form Application custom close button
提问by Joshua Bakker
I created a new UI style like Visual Studios 2012 (the upper line with close button for example)
我创建了一个像 Visual Studios 2012 这样的新 UI 样式(例如带有关闭按钮的上线)
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 notwork.
Me.Close(),Application.Exit()和Application.ExitThread()不不工作。
回答by Joe Clifford
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.
查看您的项目属性菜单。可以选择程序何时结束。选项将类似于“第一个打开的表格关闭”、“最后一个表格关闭”等。
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
乔

