G
Guest
I have the following code:
Dim MyStartupArguments() As String
MyStartupArguments = System.Environment.GetCommandLineArgs
UBound(MyStartupArguments)
RomName = (MyStartupArguments(0).ToString)
ParentName = (MyStartupArguments(1).ToString)
If ParentName = "" Then
LookUp = RomName
Else
Answer = Len(ParentName)
LookUp = Microsoft.VisualBasic.Right(ParentName, (Answer - 1))
End If
lpAppName = LookUp
The problem seems to be that sometimes there is one command line argument and sometimes there are two. If there are two, everything is alright. If there is just one I get an error when it reads the "ParentName" line. Do I need to somehow grab the arguments with a loop and keep checkin until something is nell? How would I do that?
Also, this is a tough program to debug in the GUI since it relies on command line arguments. Is there a way to send commandline arguments with the GUI for debugging so I can step through my code?
Thank you,
John
Dim MyStartupArguments() As String
MyStartupArguments = System.Environment.GetCommandLineArgs
UBound(MyStartupArguments)
RomName = (MyStartupArguments(0).ToString)
ParentName = (MyStartupArguments(1).ToString)
If ParentName = "" Then
LookUp = RomName
Else
Answer = Len(ParentName)
LookUp = Microsoft.VisualBasic.Right(ParentName, (Answer - 1))
End If
lpAppName = LookUp
The problem seems to be that sometimes there is one command line argument and sometimes there are two. If there are two, everything is alright. If there is just one I get an error when it reads the "ParentName" line. Do I need to somehow grab the arguments with a loop and keep checkin until something is nell? How would I do that?
Also, this is a tough program to debug in the GUI since it relies on command line arguments. Is there a way to send commandline arguments with the GUI for debugging so I can step through my code?
Thank you,
John