home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1997 March / VPR9703A.ISO / MS_DEV / VBCCE / SAMPLES / AXMrquis / AXMrquis.EXE / RCDATA / CABINET / Global.bas < prev    next >
BASIC Source File  |  1996-10-22  |  2KB  |  82 lines

  1. Attribute VB_Name = "GlobalStuff"
  2. Option Explicit
  3.  
  4. ' Offset and Width into the bitmap of characters
  5. Type CharBMP
  6.   Left As Long
  7.   Width As Long
  8. End Type
  9.  
  10. ' Describes the Space column bitmap
  11. Public aCharSpace As CharBMP
  12.  
  13. ' Array of entries into the character bitmap
  14. Public aChars(65 To 90) As CharBMP
  15.  
  16. 'Each Bulb is 5 pixels wide.
  17. Public Const BULB_WIDTH = 5
  18.  
  19. 'Each character is 34 pixels tall.
  20. Public Const CHAR_HEIGHT = 36
  21.  
  22. 'There are two different character widths
  23. Public Const CHAR_THIN = 30
  24. Public Const CHAR_WIDE = 35
  25.  
  26. Public Sub InitBMPStruct()
  27.   Dim x As Long
  28.   
  29.   'Init the Space bitmap
  30.   aCharSpace.Left = 0
  31.   aCharSpace.Width = 5
  32.   
  33.   'Init A
  34.   aChars(65).Left = 0
  35.   aChars(65).Width = CHAR_WIDE
  36.   
  37.   For x = 66 To 72  'Init B thru H
  38.     aChars(x).Left = aChars(x - 1).Left + aChars(x - 1).Width
  39.     aChars(x).Width = CHAR_WIDE
  40.   Next x
  41.   
  42.   'I
  43.   aChars(73).Left = aChars(72).Left + aChars(72).Width
  44.   aChars(73).Width = CHAR_THIN
  45.   
  46.   'J
  47.   aChars(74).Left = aChars(73).Left + aChars(73).Width
  48.   aChars(74).Width = CHAR_WIDE
  49.   
  50.   'K
  51.   aChars(75).Left = aChars(74).Left + aChars(74).Width
  52.   aChars(75).Width = CHAR_THIN
  53.   
  54.   For x = 76 To 83  'Init L thru S
  55.     aChars(x).Left = aChars(x - 1).Left + aChars(x - 1).Width
  56.     aChars(x).Width = CHAR_WIDE
  57.   Next x
  58.   
  59.   'T
  60.   aChars(84).Left = aChars(83).Left + aChars(83).Width
  61.   aChars(84).Width = CHAR_THIN
  62.   
  63.   'U
  64.   aChars(85).Left = aChars(84).Left + aChars(84).Width
  65.   aChars(85).Width = CHAR_WIDE
  66.  
  67.   'V
  68.   aChars(86).Left = aChars(85).Left + aChars(85).Width
  69.   aChars(86).Width = CHAR_THIN
  70.   
  71.   'W
  72.   aChars(87).Left = aChars(86).Left + aChars(86).Width
  73.   aChars(87).Width = 50
  74.   
  75.   'X thru Z
  76.   For x = 88 To 90
  77.     aChars(x).Left = aChars(x - 1).Left + aChars(x - 1).Width
  78.     aChars(x).Width = CHAR_THIN
  79.   Next x
  80.  
  81. End Sub
  82.