|
-
Oct 8th, 2011, 12:35 AM
#1
Thread Starter
Addicted Member
App does not get CommandLine Args
When debugging my app it works fine i.e. It gets the two commandline args, through a loop, and execute as expected. However, once I publish it, the app only picks up the first argument, which is the .exe file string. What am I doing wrong here? Plz help. Code below:
_____________________________________________________
Public Sub Main()
Dim args() As String = Environment.GetCommandLineArgs()
Dim n As integer = args.Length
Dim i as integer
MsgBox("No of args is:" & n)
While i < n
_ _ _
Next
End Sub
(passed args as: -a -k, in the File Debug Properties)
n is 3 in Debug mode and 1 after publishing the app. Why?
____________________________________________
Thanks for helping.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|