home *** CD-ROM | disk | FTP | other *** search
/ Dan Appleman's Visual Bas…s Guide to the Win32 API / Dan.Applmans.Visual.Basic.5.0.Programmers.Guide.To.The.Win32.API.1997.Ziff-Davis.Press.CD / VB5PG32.mdf / vbpg32 / samples5 / ch04 / ch04.frm (.txt) next >
Encoding:
Visual Basic Form  |  1996-11-03  |  1.2 KB  |  47 lines

  1. VERSION 5.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "Conditional Compilation Demo"
  4.    ClientHeight    =   3180
  5.    ClientLeft      =   1095
  6.    ClientTop       =   1515
  7.    ClientWidth     =   6345
  8.    LinkTopic       =   "Form1"
  9.    PaletteMode     =   1  'UseZOrder
  10.    ScaleHeight     =   3180
  11.    ScaleWidth      =   6345
  12.    Begin VB.CommandButton Command1 
  13.       Caption         =   "Command1"
  14.       Height          =   615
  15.       Left            =   3600
  16.       TabIndex        =   0
  17.       Top             =   840
  18.       Width           =   1695
  19.    End
  20. Attribute VB_Name = "Form1"
  21. Attribute VB_GlobalNameSpace = False
  22. Attribute VB_Creatable = False
  23. Attribute VB_PredeclaredId = True
  24. Attribute VB_Exposed = False
  25. Option Explicit
  26. ' Compile time constant
  27. #Const UCASECTCONSTANT = True
  28. ' Runtime constant
  29. Dim UCASERTVARIABLE As Boolean
  30. Private Sub Command1_Click()
  31. Dim a$, b$
  32. UCASERTVARIABLE = True
  33. a$ = "This Was A Mixed Case String"
  34. b$ = "This Was Another Mixed Case String"
  35. #If UCASECTCONSTANT Then
  36.     a$ = UCase$(a$)
  37. #Else
  38.     a$ = LCase$(a$)
  39. #End If
  40. If UCASERTVARIABLE Then
  41.     b$ = UCase$(b$)
  42.     b$ = LCase$(b$)
  43. End If
  44. Print a$
  45. Print b$
  46. End Sub
  47.