Sub Main

  • Thread starter Thread starter Sean
  • Start date Start date
S

Sean

Hi all,

I am just wondering why I can't find the sub main in my
application. I know that the sub main is the entry point
for a program. Is it because the MS Visual Studio .Net
somehow hides the sub main?

Any suggestion would be appreciated.

regards,
Sean
 
Hi,

There isnt one by default in vb.net windows application. Add a
module to your project add sub main and set it to be the startup object in
the projects properties.

Ken
----------------
Hi all,

I am just wondering why I can't find the sub main in my
application. I know that the sub main is the entry point
for a program. Is it because the MS Visual Studio .Net
somehow hides the sub main?

Any suggestion would be appreciated.

regards,
Sean
 
Sean said:
I am just wondering why I can't find the sub main in my
application. I know that the sub main is the entry point
for a program. Is it because the MS Visual Studio .Net
somehow hides the sub main?

If a form class is selected as startup object in the project properties,
Visual Basic will implicitly generate the 'Sub Main' when compiling
automatically.
 
There is only an "automatic" Sub Main, if you are in a Console Application,
not in Windows or ASP.NET applications.
 
Scott M. said:
There is only an "automatic" Sub Main, if you are in a Console
Application, not in Windows

That's not true. Even in Windows Forms applications, you don't need to
create a 'Sub Main'.
 
Huh? I didn't say that you do need a Sub Main in a Windows application. I
said there is NOT an automatic Sub Main made for you in a Windows
application and that there IS in a Console application.
 
Scott,
In my opinion were all who answered giving answers on different questions,
which could be read from the original question.

Therefore, there was in my opinion nothing wrong with your answer, when you
read the question as you probably did.

Therefore, I found the reply on your answer funny, because Herfried was
answering on a different explanation of the question.

I was writing something however; than I thought better that Scott does it
first, and did not sent that.

:-)

Cor



Scott M. said:
Huh? I didn't say that you do need a Sub Main in a Windows application.
I said there is NOT an automatic Sub Main made for you in a Windows
application and that there IS in a Console application.
 
Scott M. said:
Huh? I didn't say that you do need a Sub Main in a Windows application.
I said there is NOT an automatic Sub Main made for you in a Windows
application and that there IS in a Console application.

It seems that we are talking about different things... I was referring to
implicitly generated 'Sub Main's too while you were referring to code added
to the visible source code by the IDE.
 
Back
Top