Hi there,
I've written a Programm which shall be started with or without Parameters. Without Parameters, a setup-form is loaded, with Parameters, a FTP-Transfer-form is loaded. I've included a Sub main-procedure and deactivated the Framework and everything works fine but only within the IDE. If I start the compiled exe-file, the Sub main is noz executed.
Here's the code:
so when called without Parameters, SetupFRM should be loaded but isn't. So it seems that this code is not executed but FTPFRM loaded when the exe is started(I forgot to mention above, that Sub main is selected as start-object)
Hay anybody any idea what might cause this.
Best regards
Thomas
I've written a Programm which shall be started with or without Parameters. Without Parameters, a setup-form is loaded, with Parameters, a FTP-Transfer-form is loaded. I've included a Sub main-procedure and deactivated the Framework and everything works fine but only within the IDE. If I start the compiled exe-file, the Sub main is noz executed.
Here's the code:
Code:
Public Sub Main()
Dim lDoSetup As Boolean = False
Dim aCom As String() = Environment.GetCommandLineArgs
If aCom.Length > 0 Then
If aCom.Length = 1 Then
If Debugger.IsAttached Then
lDoSetup = True
End If
End If
Else
lDoSetup = True
End If
If lDoSetup Then
MsgBox("Setup ist True")
End If
If lDoSetup Then
Application.Run(New SetupFRM)
Else
Application.Run(New FTPFRM(aCom))
End If
End Sub
Hay anybody any idea what might cause this.
Best regards
Thomas
Comment