最佳解答者
How to run a procedure in a form and then automatically close it?

問題
-
I use Visual Studio 2005. In VB, it should able to close a form by me.close() but when I put the code in activated event, the program does not return the control to Visual Studio and no form is appeared. I need manually to push the stop debugging icon to return the control to the Visual Studio. Anyone can help?
2008年12月13日 2:42
解答
-
In .NET, if you write VB, You should now learn the new coding way.
Normally we will create a new Class File and then create a Sub Main in it. And then set the Project Startup File is the class.
Then you call Application.Run(new Form1())
More detail in the following link,
Application.Run Method
http://msdn.microsoft.com/en-us/library/system.windows.forms.application.run(VS.71).aspx
2008年12月19日 8:41
所有回覆
-
In .NET, if you write VB, You should now learn the new coding way.
Normally we will create a new Class File and then create a Sub Main in it. And then set the Project Startup File is the class.
Then you call Application.Run(new Form1())
More detail in the following link,
Application.Run Method
http://msdn.microsoft.com/en-us/library/system.windows.forms.application.run(VS.71).aspx
2008年12月19日 8:41