子主 [英] sub Main

查看:130
本文介绍了子主的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



在VB Classic中,我在所有程序中使用了一个sub main()。如何在没有将应用程序类型设置为控制台应用程序的情况下在

VB.net中执行此操作?看起来

就像当我把它设置为控制台时禁用一些本地

第一周的vb.net ....开始真的很喜欢它.... 。

Brian

解决方案

Brian Shafer写道:


In VB Classic我在所有程序中都使用了sub main()。如果不将应用程序类型设置为Console应用程序,我如何在
VB.net中执行此操作?看起来
就像当我把它设置为控制台时禁用一些本地
第一周的vb.net ....开始真的很喜欢它.....
Brian




制作模块。把一个副主力放在那里。然后转到项目

属性并将启动更改为您的模块。


Chris


这是有效的,只要我没有启用应用程序框架即可。检查。

启用应用程序框架的主要目的是什么?


另外,从子Main打开表单的正确方法是什么( )?

Brian


" Chris" < no@spam.com>在消息中写道

新闻:ON ************** @ TK2MSFTNGP12.phx.gbl ...

Brian Shafer写道:< blockquote class =post_quotes>
在VB Classic中,我在所有程序中都使用了sub main()。如何在没有将应用程序类型设置为控制台应用程序的情况下在VB.net中执行此操作?
看起来当我将其设置为控制台时禁用某些属性
第一周的vb.net ....开始真的很喜欢它.....
Brian



制作一个模块。把一个副主力放在那里。然后转到项目
属性并将启动更改为您的模块。

Chris



" Brian Shafer" ; <峰; bs ******** @ community.nospam>写在

新闻:u9 ************** @ TK2MSFTNGP15.phx.gbl:

这有效,如只要我没有启用应用程序框架
检查。 启用应用程序框架的主要目的是什么?

另外,从子Main()打开表单的正确方法是什么?
Brian
克里斯 < no@spam.com>在消息中写道
新闻:ON ************** @ TK2MSFTNGP12.phx.gbl ...

Brian Shafer写道:


在VB Classic中,我在所有程序中都使用了一个sub main()。如何在没有将应用程序类型设置为Console
应用程序的情况下在VB.net中执行此操作?看起来当我把它设置为控制台它禁用了一些
适当的第一周的vb.net ....开始真的很喜欢它
也是.....
Brian



制作一个模块。把一个副主力放在那里。然后转到项目
属性并将启动更改为您的模块。

Chris




没什么经验sub_Main-ing我自己,但是从我读过的内容:


System.Windows.Forms.Application.Run(formname)是最好的方法,尽管


formname.ShowDialog也应该有效。


忏悔者


Hi,
In VB Classic I used a sub main() in all my programs. How do I do that in
VB.net without setting the application type to Console application? Looks
like when I set it to console it disable some of the properites
First week of vb.net.... starting to really like it too.....
Brian

解决方案

Brian Shafer wrote:

Hi,
In VB Classic I used a sub main() in all my programs. How do I do that in
VB.net without setting the application type to Console application? Looks
like when I set it to console it disable some of the properites
First week of vb.net.... starting to really like it too.....
Brian



Make a module. Put a sub main in there. Then go to the project
properties and change the startup to your module.

Chris


That works, as long as I don''t have "Enable application framework" check.
What is the main purpose of "Enable application framework"

Also, what is the proper way of opening a form from the sub Main()?
Brian

"Chris" <no@spam.com> wrote in message
news:ON**************@TK2MSFTNGP12.phx.gbl...

Brian Shafer wrote:

Hi,
In VB Classic I used a sub main() in all my programs. How do I do that
in VB.net without setting the application type to Console application?
Looks like when I set it to console it disable some of the properites
First week of vb.net.... starting to really like it too.....
Brian



Make a module. Put a sub main in there. Then go to the project
properties and change the startup to your module.

Chris



"Brian Shafer" <bs********@community.nospam> wrote in
news:u9**************@TK2MSFTNGP15.phx.gbl:

That works, as long as I don''t have "Enable application framework"
check. What is the main purpose of "Enable application framework"

Also, what is the proper way of opening a form from the sub Main()?
Brian

"Chris" <no@spam.com> wrote in message
news:ON**************@TK2MSFTNGP12.phx.gbl...

Brian Shafer wrote:

Hi,
In VB Classic I used a sub main() in all my programs. How do I do
that in VB.net without setting the application type to Console
application? Looks like when I set it to console it disable some of
the properites First week of vb.net.... starting to really like it
too.....
Brian



Make a module. Put a sub main in there. Then go to the project
properties and change the startup to your module.

Chris



Not much experience sub_Main-ing myself, but from what I''ve read:

System.Windows.Forms.Application.Run(formname) is the best method, though

formname.ShowDialog should also work.

The Confessor


这篇关于子主的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆