开发者

Application Sub Main

I've created an .Net application. Now I wanted to include a application crashed - I am sorry开发者_Python百科 messagebox. But I cannot find any Sub Main() routine or even if I create my new own module I am not able to selecte the Sub Main() in the module as startobject.

Any advice?

Application Sub Main


Did you create a VB.NET application? If so, you'll need to add your own Sub Main(). The disadvantage of this, however, is that you'll have to manually handle all of the startup processing and initialization that the .NET Framework normally does for you automatically.

But if all you want to do is show an error message when an unhandled exception occurs, there's no reason to create your own Sub Main(). All you have to do is add a handler for the AppDomain.UnhandledException event.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜