Linker IT Software
Google
Web www.oraxcel.com
menubar-top-links menubar-top-rechts
Home Help Search Login
Welcome, Guest. Please Login.
SQL*XL: Database to Excel bridge litLIB: Excel power functions pack ExcelLock: Locking and securing your valuable Excel spreadsheets encOffice: Protect your Excel file easy and safe encOffice: Protect your Excel file easy and safe
Pages: 1
VB6 multiple conditional compilation arguments (Read 11264 times)
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
VB6 multiple conditional compilation arguments
30.03.07 at 15:07:17
 
VB6 multiple conditional compilation arguments
 
In VB6 (classic VB) you can use conditional compilation arguments so you can build different flavours of your program by just setting the compilation argument.  
 
In the project properties, in the make tab you can enter the arguments. E.g. you can enter the following arguments to create the testing and debugging variables:
testing = 1 : debugging = 1
 
The way to separate the arguments is by using a colon (:)
 
In the code you can use the variables to conditionally compile your project. Example:
[tt]
#if testing then
Public Sub DoSomething(MyVar as clsMyClass)
#else  
Public Sub DoSomething(MyVar as Object)
#end if
  Msgbox "Hi"
End Sub
Back to top
 
« Last Edit: 30.03.07 at 15:07:47 by Gerrit-Jan Linker »  

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
VB6 conditional compilation arguments
Reply #1 - 05.10.09 at 09:40:04
 
VB6 conditional compilation arguments
 
Conditional compilation arguments can be given in a VB6 project in the make section of the project properties. If a value is set to 1 the argument evaluates as true and 0 means false.
 
The following compilation argument is therefore true:
 
testing = 1
 
Back to top
 
 

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Pages: 1