home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form Form1
- Caption = "Conditional Compilation Demo"
- ClientHeight = 3180
- ClientLeft = 1095
- ClientTop = 1515
- ClientWidth = 6345
- Height = 3585
- Left = 1035
- LinkTopic = "Form1"
- ScaleHeight = 3180
- ScaleWidth = 6345
- Top = 1170
- Width = 6465
- Begin VB.CommandButton Command1
- Caption = "Command1"
- Height = 615
- Left = 3600
- TabIndex = 0
- Top = 840
- Width = 1695
- End
- Attribute VB_Name = "Form1"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Option Explicit
- ' Compile time constant
- #Const UCASECTCONSTANT = True
- ' Runtime constant
- Dim UCASERTVARIABLE As Boolean
- Private Sub Command1_Click()
- Dim a$, b$
- UCASERTVARIABLE = True
- a$ = "This Was A Mixed Case String"
- b$ = "This Was Another Mixed Case String"
- #If UCASECTCONSTANT Then
- a$ = UCase$(a$)
- #Else
- a$ = LCase$(a$)
- #End If
- If UCASERTVARIABLE Then
- b$ = UCase$(b$)
- b$ = LCase$(b$)
- End If
- Print a$
- Print b$
- End Sub
-