Hi,
I was on the forum yesterday asking for help with using command line parameters. As described I am new to vb.net programming, and I am stuck with what is probably a very simply problem.
I am trying to create a vb.net program to which I will be passed parameters from another program. As a test I am doing the very simple following code
<code>
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Label1.Text = My.Application.CommandLineArgs(0)
End Sub
</code>
When I am running this in debug mode, with a command line parameter passed, the label shows the expected result. However whenever I try and publish the program, and install it, I get an error saying
"Index was out of range. Must be non-negative and less than the size of the collection".
I am thinking this is because I need to run it from the command line, however, i am not even sure how to do this! In the folder where the setup.exe exists there is a windowsApplication1 application manifest, but I cant find the .exe.
Please can anyone help with this??? It has been driving me crazy!
Kindest regards,
David.