Click here to Skip to main content
15,899,754 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
HI there,

I am new to vb. I know c#,core java..etc. But i want to learn Vb now.

Can anybody tell me how to fetch parameters which have been passed from commandline to a vb form.

Ex: I created a ActiveX exe in vb and i called that exe in command prompt.

c: Test\cry.exe HELLO My name is PK

My question is how can i seperate or split the string("HELLO My name is PK") and store in an array. how can i pass the forloop for it.

Please anybody help.....

Also please tell me the difference between Interaction.Command$ and Command.
Posted
Updated 21-Oct-12 6:30am
v3

1 solution

I've a answer to your first question.
In the Main of your application, you can add a args parameter:
VB
Private Shared Sub Main(args As String())
	' now, args(0) contains the first argument, args(1) the second argument,...
End Sub
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900