Ok I have an app and I want to be able to execute from command line and from GUI.
I created a sub main
however, the problem is it pops up the form and disappears w/o any type of input from the userCode:Public Shared Sub main() Dim args As String() = Environment.GetCommandLineArgs() Dim arg As String If args.GetUpperBound(0) = 0 Then ' load user interaction form Dim f As New frmNetStat() f.FormLoad() Else frmNetStat.GetCommandLineArgs() ' process arguments ' no visual display is necessary End If End Sub Public Sub FormLoad() lblStatus.Text = "Awaiting command..." g_strConnection = "connection info..." ' form shows up and then exits immediately Me.Show() End Sub
My sub main procedure is placed just below the
Public Sub New proc...
public sub form load is in the main part of the code
I did change the startup to be Sub Main and not the standard formload.
Any ideas![]()





Reply With Quote