Newby问题:在vb.net中更新到Sub Main [英] Newby Question : Update to Sub Main in vb.net
问题描述
嗨:
我正试图在我的VB.NET窗口中实现一个整体错误处理程序
应用程序。
我需要放置一个On Error Goto在Sub Main中。
我试图创建一个Sub Main并且没有运气 - 所有的例子
我已经读过了我也不会向我解释这个。
创建项目时是否有某些地方定义了Sub Main -
任何帮助都会非常感激!
谢谢,
Fred
Hi:
I''m trying to implement an overall error handler in my VB.NET windows
application.
I need to place an "On Error Goto" in "Sub Main".
I have tried to create a Sub Main and have had no luck - all the examples
I''ve read don''t explain this to me either.
Is there some place where Sub Main is defined when you create a project -
any help would be GREATLY appreciated!
Thanks,
Fred
推荐答案
"弗雷德尼尔森< FR ** @ smartybird.com> schrieb:
"Fred Nelson" <fr**@smartybird.com> schrieb:
我正在尝试在我的
VB.NET windows应用程序中实现一个整体错误处理程序。
我需要放置一个On Error转到"在Sub Main中。
我试图创建一个Sub Main并且没有运气 - 所有的例子
我读过这个也不向我解释。
I''m trying to implement an overall error handler in my
VB.NET windows application.
I need to place an "On Error Goto" in "Sub Main".
I have tried to create a Sub Main and have had no luck - all the examples
I''ve read don''t explain this to me either.
\\\
公共模块计划
Public Sub Main()
...
End Sub
结束模块
///
在项目属性中,将''Sub Main''设置为启动对象。
-
Herfried K. Wagner [MVP]
< URL:http://dotnet.mvps.org/>
\\\
Public Module Program
Public Sub Main()
...
End Sub
End Module
///
In the project properties, set ''Sub Main'' as startup object.
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Herfried:
谢谢非常感谢您的回复!我很困惑这个
进入哪个文件。我创建了一个新项目,我试图插入
代码:
公共模块程序
public sub main()
end sub
结束模块
<我的Form1中有
我犯了很多错误。
这应该是一个类库 - 或者它应该去哪里?
再次感谢!
Fred
" Herfried K. Wagner [MVP]" <喜*************** @ gmx.at>在消息中写道
news:%2 **************** @ TK2MSFTNGP15.phx.gbl ...
Herfried:
Thanks very much for your reply! I''m very confused as to which file this
goes in. I''ve created a new project and I have attempted to inserte the
code:
public module program
public sub main()
end sub
end module
in my Form1 and I get lot of errors.
Should this be a class library - or where should this go?
Thanks again!
Fred
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
"弗雷德尼尔森 < FR ** @ smartybird.com> schrieb:
"Fred Nelson" <fr**@smartybird.com> schrieb:
我正在尝试在我的
VB.NET windows应用程序中实现一个整体错误处理程序。
我需要放置一个On Error转到"在Sub Main中。
我试图创建一个Sub Main并且没有运气 - 我读过的所有
例子都没有向我解释这个。
I''m trying to implement an overall error handler in my
VB.NET windows application.
I need to place an "On Error Goto" in "Sub Main".
I have tried to create a Sub Main and have had no luck - all the examples I''ve read don''t explain this to me either.
\\\
公共模块计划
Public Sub Main()
...
End Sub
结束模块
///
在项目属性中,将''Sub Main''设置为启动对象。
-
Herfried K. Wagner [MVP]
< URL:http://dotnet.mvps.org/>
\\\
Public Module Program
Public Sub Main()
...
End Sub
End Module
///
In the project properties, set ''Sub Main'' as startup object.
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Herfired :
我想通了 - 我创建了一个类并将其作为启动对象然后
称为我的表单!
再次感谢您的帮助!
Fred
" Herfried K. Wagner [MVP]" <喜*************** @ gmx.at>在消息中写道
news:%2 **************** @ TK2MSFTNGP15.phx.gbl ...
Herfired:
I figured it out - I created a class and made it the startup object and then
called my form!
Thanks again for your help!
Fred
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
"弗雷德尼尔森 < FR ** @ smartybird.com> schrieb:
"Fred Nelson" <fr**@smartybird.com> schrieb:
我正在尝试在我的
VB.NET windows应用程序中实现一个整体错误处理程序。
我需要放置一个On Error转到"在Sub Main中。
我试图创建一个Sub Main并且没有运气 - 我读过的所有
例子都没有向我解释这个。
I''m trying to implement an overall error handler in my
VB.NET windows application.
I need to place an "On Error Goto" in "Sub Main".
I have tried to create a Sub Main and have had no luck - all the examples I''ve read don''t explain this to me either.
\\\
公共模块计划
Public Sub Main()
...
End Sub
结束模块
///
在项目属性中,将''Sub Main''设置为启动对象。
-
Herfried K. Wagner [MVP]
< URL:http://dotnet.mvps.org/>
\\\
Public Module Program
Public Sub Main()
...
End Sub
End Module
///
In the project properties, set ''Sub Main'' as startup object.
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
这篇关于Newby问题:在vb.net中更新到Sub Main的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!