Thursday, August 24, 2006

Creating a Simple Windowless Program

Sometimes you want to create a headless program (i.e. no display) to do something simple (say delete files from a directory). You can do this with a vbs file, a cpp program with WinMain, etc. But the easist way for a VB.NET program is:

Public Class Simple
Public Shared Sub Main()
' Insert code here
End Sub
End Class

Make sure the project properties are setup for a windows application and the Startup Object is Sub Main.

No comments: