I recently needed to write a program that had an attended and unattended mode:
1. Create a console application in Visual Studio .NET.
2. Use this as a template:
If Command$() = "-winform" Then
Dim frm As New testform()
Console.WriteLine("this is the console option")