|
-
Nov 22nd, 2006, 04:20 PM
#1
Thread Starter
Fanatic Member
[2005] Conditional Compilation
I have a VB 2005 application that I need to compile differently based upon some parameters. This application is going to be run in 2 different branch offices with different servers. One of the things I would like to have conditional is ServerName. That way I don't have to create DSNs on the workstations.
Along with a few constants, I also want to conditionally compile the application's name and icon.
Any assistance would be greatly appreciated.
PS - I am using VB 2005 Express.
My.Settings.Signature = String.Empty
-
Nov 22nd, 2006, 09:09 PM
#2
Addicted Member
Re: [2005] Conditional Compilation
Try using #if
ex.
VB Code:
dim const a as integer=1
#if a=1 then
'Put your code when a=1
#else
'Put your code when a=another value
#end if
What you need is to change your constanta in order to work
-
Nov 22nd, 2006, 09:09 PM
#3
Re: [2005] Conditional Compilation
Why not use a config file?
-
Nov 22nd, 2006, 09:12 PM
#4
Thread Starter
Fanatic Member
Re: [2005] Conditional Compilation
Creating #Const requires me to place them into the class that they will be used from. I would prefer to have a central place to hold all conditional arguments and then use #If statements.
I have never used a config file before. Do you have any examples? I will surf around and see what I can find.
My.Settings.Signature = String.Empty
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
|