Can you start a vb.net app without a form?

  • Thread starter Thread starter COHENMARVIN
  • Start date Start date
C

COHENMARVIN

In vb6 you could start a program from a 'main' routine that was in a
module. But I don't see modules in vb.net. There just seem to be
forms and classes. Is there any way to start the program so that you
aren't showing a form immediately?
Thanks,
Marv
 
In vb6 you could start a program from a 'main' routine that was in a
module. But I don't see modules in vb.net. There just seem to be
forms and classes. Is there any way to start the program so that you
aren't showing a form immediately?
Thanks,
Marv

Just start a console application project, and your module is ready
with Sub Main().

Thanks,

Onur Güzel
 
Marv,

To give you the oldest VB.Net version.

Right click on the project and do add new item and choose module

\\\
Module Module1
Private frm As Form1
Public Sub Main()
Application.Run()
frm.Show()
End Sub
End Module
///

Then we have something different per version, in version 2008 it is

Choose the properties from the applications and change the form project to a
console project and the "startup box" to Sub Main

Cor
 
Back
Top