Question about setting Command Line Arguments from Project Properties

R

rforman1

I have found many threads with this question asked and ostensibly
answered, but none with an example of how exactly to do it. Help! I
know that in order to set up the values of command line arguments from
within the IDE, I go to Project Properties, Configuration Properties,
and then the text box labeled "Command Line Arguments" under the label
"Start Options." But what exactly do I put into that text box?

What I want to do is set up a custom conditional-compilation variable
that will act as a boolean, suppose I want to call it Test1, then I
want to be able to use this code:

#If test1 then
messagebox.show "yes"
#else
messagebox.show "no"
#End if

.....so in order to define that "variable" or compilation constant I
guess would be the right term, and set its value (let's say I want to
set it True), what do I type into the Command Line Arguments text box?
I've tried these, stabbing from what examples I could find but nothing
happens:

test1
/test1
test1=true
test1=-1

.....but it never seems to evaluate to True in the code statement. Am I
close? (Also, by setting the variable in the IDE this way, it should
take effect when I run my app in the IDE by pressing F5, right?, I
mean, it's not like I have to compile to an .exe and then run that .exe
to get it to take effect?)

Thanks very much.

richforman
 
C

Chris, Master of All Things Insignificant

You are mixing two different concepts. You can not do command line
arguments for compile time conditions. The code is already compiled and the
path of execution is already decided. I think you need to look at
condtional compilation contraints in teh Build section of configuration
properties.

Hope it helps
Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top