Reputation: 47
i tried to read passed parameter,
for example:
shell:
MyApplication.exe -t 1233123
MyApplication Code:
dim tt as string = GetArgo(0).toString()
i want to get the "1233123" (i tried Me.Startup but i there is no Startup event in my form)
Upvotes: 1
Views: 126
Reputation: 612964
You can get hold of the arguments by calling Environment.GetCommandLineArgs
:
Dim args() As String = Environment.GetCommandLineArgs()
And then you can iterate through this array just like you would any other array. Remember that the first item in the array is the file name of the executing program.
Upvotes: 3