且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Newby问题:在vb.net中更新到Sub Main

更新时间:2023-02-17 21:08:24

"弗雷德尼尔森< FR ** @ smartybird.com> schrieb:
"Fred Nelson" <fr**@smartybird.com> schrieb:
我正在尝试在我的
VB.NET windows应用程序中实现一个整体错误处理程序。

我需要放置一个On Error转到&QUOT;在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

结束模块
我犯了很多错误。


这应该是一个类库 - 或者它应该去哪里?


再次感谢!


Fred


" Herfried K. Wagner [MVP]" &LT;喜*************** @ gmx.at&GT;在消息中写道

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...
"弗雷德尼尔森 &LT; FR ** @ smartybird.com&GT; schrieb:
"Fred Nelson" <fr**@smartybird.com> schrieb:
我正在尝试在我的
VB.NET windows应用程序中实现一个整体错误处理程序。

我需要放置一个On Error转到&QUOT;在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]" &LT;喜*************** @ gmx.at&GT;在消息中写道

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...
"弗雷德尼尔森 &LT; FR ** @ smartybird.com&GT; schrieb:
"Fred Nelson" <fr**@smartybird.com> schrieb:
我正在尝试在我的
VB.NET windows应用程序中实现一个整体错误处理程序。

我需要放置一个On Error转到&QUOT;在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/>