Link to home
Start Free TrialLog in
Avatar of killer5
killer5

asked on

command line argument

how can i use command line arguments on my VB application?

for instance:
If I run this command from the command line, it should display the sum of the arguments...

c:\MyApp.exe /x=1 /y=2

ASKER CERTIFIED SOLUTION
Avatar of TimCottee
TimCottee
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Oh, forgot the sum bit:

Msgbox x + y

After the for .. next loop.
Avatar of sierrahalflife
sierrahalflife

the important bit of that is the 'Command' variable.
If I called myapp.exe /a /b 1, Command would be "/a /b 1"
you should consider splitting at the slash, rather than the space if your app uses an argument like /time 5, as opposed to /time=5, otherwise it would take /time and 5 as separate arguments.

--SHL
Why a 'C' grade?
killer5

COuld you please explain why expert TimCotte only received a "C" grade for his answer? Please provide feedback if you are not happy with an answer and our experts will try to clarify their comments.


Here are the guidelines for grading:

A: The Expert(s) either provided you with a thorough answer or they provided you with a link to information that thoroughly answered your question. An "A" can also be given to any answer that you found informative or enlightening beyond the direct question that you asked.

B: The Expert(s) provided an acceptable solution, or a link to an acceptable solution, that you were able to use, although you may have needed a bit more information to complete the task.

C: Because Experts' reliability are often judged by their grading records, many Experts would like the opportunity to clarify if you have questions about their solutions. If you have given the Expert(s) ample time to respond to your clarification posts and you have responded to each of their posts providing requested information; or if the answers, after clarification, lack finality or do not completely address the issue presented, then a "C" grade is an option. You also have the option here of just asking Community Support to delete the question.


** Mindphaser - Community Support Moderator **
Because he's stingy?
Grade changed for TimCottee.

** Mindphaser - Community Support Moderator **
Hello killer5, keep grading people like this, and you will lose support for most of the Experts, as they do look at how Customers you grade, before answering or just joining in.


I am behind Minphasers decision on the grade change.  Should you have a problem with the change,

I can be contacted at comtech@experts-exchange.com , if so, then please reference this question number 20290788

Regards,
ComTech
CS Admin @ EE
Avatar of killer5

ASKER

oh... sorry guys. i didn't know why i put a grade C on this. maybe i made a mistake. and i don't know that it was a big deal.. sorry :)