home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code1 / mem_mstr / memory.gbl < prev    next >
Text File  |  1992-01-20  |  12KB  |  244 lines

  1. DefInt A-Z
  2.      
  3.     Global CARD$(48)
  4.     Global A$(24)
  5.     Global UPBUTTON$, NUMFLAGS, MATCHES, GAMEBOARD
  6.      
  7.     Global BUTTON1, BUTTON2, TRIES, PICKED
  8.  
  9.     
  10. Global Const TRUE = -1, FALSE = 0
  11.  
  12.     Type SCORERECORD
  13.     WINNER      As String * 30
  14.     POINTS      As Integer
  15.     DMY         As String * 20
  16.     End Type
  17.  
  18.     Global SCORE As SCORERECORD
  19.  
  20.  
  21. '--------------------------------------------------------------------------
  22. ' These are the user-defined TYPE declarations for VBTOOLS.VBX
  23.  
  24.     Type WinFlags
  25.  
  26.       WF_80x87 As Integer ' True or false
  27.       WF_CPU   As Integer ' 86,186,286,386,486
  28.       WF_MODE  As Integer ' 1=Standard,2=386 enhanced
  29.       WF_FRAME As Integer ' 1=EMS large-frame, 2=EMS small-frame
  30.  
  31.     End Type
  32. '--------------------------------------------------------------------------
  33. ' These are the SUB and FUNCTION declarations for VBTOOLS.VBX
  34.   
  35.     Declare Function Bload% Lib "vbtools.vbx" (ByVal Lin$, X As Any, ByVal Length&)
  36.     Declare Function Bsave% Lib "vbtools.vbx" (ByVal Lin$, X As Any, ByVal Length&)
  37.     Declare Function CVDMBF# Lib "vbtools.vbx" (Doub$)
  38.     Declare Function CVSMBF! Lib "vbtools.vbx" (Float$)
  39.     Declare Function CVI% Lib "vbtools.vbx" (ByVal Lin$)
  40.     Declare Function CVL& Lib "vbtools.vbx" (ByVal Lin$)
  41.     Declare Function CVS! Lib "vbtools.vbx" (ByVal Lin$)
  42.     Declare Function CVC@ Lib "vbtools.vbx" (ByVal Lin$)
  43.     Declare Function CVD# Lib "vbtools.vbx" (ByVal Lin$)
  44.     Declare Function MhBlue% Lib "vbtools.vbx" (ByVal xColor&)
  45.     Declare Function MhDefaultDrive% Lib "vbtools.vbx" ()
  46.     Declare Function MhDirectoryExists% Lib "vbtools.vbx" (A$)
  47.     Declare Function MhEcode% Lib "vbtools.vbx" ()
  48.     Declare Function MhExeName$ Lib "vbtools.vbx" (ByVal Hwnd As Integer)
  49.     Declare Function MHEXEPATH$ Lib "vbtools.vbx" (ByVal Hwnd As Integer)
  50.     Declare Function MhFileExists% Lib "vbtools.vbx" (A$)
  51.     Declare Function MhFileDateCompare% Lib "vbtools.vbx" (ByVal F1$, ByVal F2$)
  52.     Declare Function MhGreen% Lib "vbtools.vbx" (ByVal xColor&)
  53.     Declare Function MhKillFiles% Lib "vbtools.vbx" (ByVal Attr%, A$)
  54.     Declare Function MhRed% Lib "vbtools.vbx" (ByVal xColor&)
  55.     Declare Sub MhRgb Lib "vbtools.vbx" (ByVal xColor&, Red%, Green%, Blue%)
  56.     Declare Sub MhScrMono Lib "vbtools.vbx" (ByVal Lin$, ByVal Row%, ByVal Col%, ByVal Attr%)
  57.     Declare Function MhSetDefaultDrive% Lib "vbtools.vbx" (ByVal A%)
  58.     Declare Function MhSystemDir$ Lib "vbtools.vbx" ()
  59.     Declare Function MhWinDir$ Lib "vbtools.vbx" ()
  60.     Declare Sub MhWinFlags Lib "vbtools.vbx" (WindowsFlags As WinFlags)
  61.     Declare Function MhWinVersion% Lib "vbtools.vbx" (Major%, Minor%)
  62.     Declare Function MKI$ Lib "vbtools.vbx" (ByVal A%)
  63.     Declare Function MKL$ Lib "vbtools.vbx" (ByVal A&)
  64.     Declare Function MKD$ Lib "vbtools.vbx" (A#)
  65.     Declare Function MKDMBF$ Lib "vbtools.vbx" (Doubl#)
  66.     Declare Function MKS$ Lib "vbtools.vbx" (A!)
  67.     Declare Function MKSMBF$ Lib "vbtools.vbx" (Float!)
  68.     Declare Function MKC$ Lib "vbtools.vbx" (A@)
  69.     Declare Function Play% Lib "vbtools.vbx" (ByVal Lin$)
  70.     Declare Sub PlayStop Lib "vbtools.vbx" ()
  71.  
  72. '--------------------------------------------------------------------------
  73. ' These are the SUB and FUNCTION declarations for Windows KEYBOARD.DRV DLL
  74.  
  75.     Declare Function GetKeyboardType% Lib "Keyboard.Drv" (ByVal nTypeFlag%)
  76.  
  77. '--------------------------------------------------------------------------
  78. ' These are the user-defined TYPE declarations for Windows GDI DLL
  79.  
  80.     Type TextMetric ' Used with GetTextMetrics
  81.       TmHeight As Integer
  82.       TmAscent As Integer
  83.       TmDescent As Integer
  84.       TmInternalLeading As Integer
  85.       TmExternalLeading As Integer
  86.       TmAveCharWidth As Integer
  87.       TmMaxCharWidth As Integer
  88.       TmWeight As Integer
  89.       TmItalic As String * 1
  90.       TmUnderlined As String * 1
  91.       TmStruckOut As String * 1
  92.       TmFirstChar As String * 1
  93.       TmLastChar As String * 1
  94.       TmDefaultChar As String * 1
  95.       TmBreakChar As String * 1
  96.       TmPitchAndFamily As String * 1
  97.       TmCharSet As String * 1
  98.       tOverhang As Integer
  99.       TmDigitizedAspectX As Integer
  100.       TmDigitizedAspectY As Integer
  101.     End Type
  102.  
  103. '--------------------------------------------------------------------------
  104. ' These are the SUB and FUNCTION declarations for Windows GDI DLL
  105.  
  106.     Declare Function GetTextExtent& Lib "Gdi" (ByVal hDC%, ByVal lpString$, ByVal nCount%)
  107.     Declare Function BitBlt% Lib "Gdi" (ByVal destDC%, ByVal X%, ByVal Y%, ByVal W%, ByVal H%, ByVal srcDC%, ByVal xSrc%, ByVal ySrc%, ByVal RasterOp&)
  108.       ' BitBlt moves a bitmap from the
  109.       ' source device to the destination
  110.       ' device. See the CONST section for
  111.       ' values for RasterOp&.
  112.     Declare Function GetTextMetrics% Lib "Gdi" (ByVal hDC%, A As TextMetric)
  113.     Declare Function GetTextCharacterExtra% Lib "Gdi" (ByVal hDC%)
  114.     Declare Function SetStretchBltMode% Lib "Gdi" (ByVal DestHdc%, ByVal StretchMode%)
  115.       ' This function sets the stretching
  116.       ' mode for the StretchBlt function.
  117.       ' The stretching mode determines
  118.       ' which scan lines and/or columns
  119.       ' StretchBlt eliminates when
  120.       ' contracting a bitmap.
  121.       ' StretchMode% is one of:
  122.       Global Const BLACKONWHITE = 1
  123.     ' AND in the eliminated lines.
  124.     ' Preserves black pixels at
  125.     ' the expense of white pixels
  126.     ' by using the AND operator
  127.     ' on the eliminated lines and
  128.     ' those remaining.
  129.       Global Const WHITEONBLACK = 2
  130.     ' OR in the eliminated lines.
  131.     ' Preserves white pixels at
  132.     ' the expense of black pixels
  133.     ' by using the OR operator
  134.     ' on the eliminated lines and
  135.     ' those remaining.
  136.       Global Const COLORONCOLOR = 3
  137.     ' Deletes the eliminated lines
  138.     ' without preserving their
  139.     ' information.
  140.  
  141.     Declare Function SetTextCharacterExtra% Lib "Gdi" (ByVal hDC%, ByVal nCharExtra%)
  142.     Declare Function StretchBlt% Lib "Gdi" (ByVal destDC%, ByVal DestX%, ByVal DestY%, ByVal W%, ByVal H%, ByVal srcDC%, ByVal xSrc%, ByVal ySrc%, ByVal wSrc%, ByVal hSrc%, ByVal RasterOp&)
  143.       ' StretchBlt moves a bitmap from a
  144.       ' source rectangle to a destination
  145.       ' rectangle, stretching or
  146.       ' compressing the bitmap if
  147.       ' necessary to fit the dimensions
  148.       ' of the destination rectangle.
  149.       ' Also see SetStretchBltMode.
  150.       ' See the CONST section for
  151.       ' values for RasterOp&.
  152.  
  153. '--------------------------------------------------------------------------
  154. ' These are the SUB and FUNCTION declarations for Windows KERNEL DLL
  155.  
  156.     Declare Function GetModuleFileName% Lib "Kernel" (ByVal hModule%, ByVal FileName$, ByVal nSize%)
  157.     Declare Function GetPrivateProfileString% Lib "Kernel" (ByVal AppName$, ByVal KeyName$, ByVal Default$, ByVal ReturnedString$, ByVal nSize%, ByVal PFileName$)
  158.     Declare Function LoadLibrary% Lib "Kernel" (ByVal LibName$)
  159.     Declare Function WritePrivateProfileString% Lib "Kernel" (ByVal AppName$, ByVal KeyName$, ByVal PString$, ByVal PFileName$)
  160.  
  161. '--------------------------------------------------------------------------
  162. ' These are the SUB and FUNCTION declarations for Windows USER DLL
  163.  
  164.     Declare Sub CreateCaret Lib "User" (ByVal Hwnd%, ByVal hBiTmap%, ByVal nWidth%, ByVal nHeight%)
  165.     Declare Sub DestroyCaret Lib "User" ()
  166.     Declare Function EnableHardwareInput% Lib "User" (ByVal TrueOrFalse%)
  167.     Declare Function ExitWindows% Lib "User" (ByVal dwReserved&, ByVal wReturnCode%)
  168.     Declare Function FlashWindow% Lib "User" (ByVal Hwnd%, ByVal bInvert%)
  169.     Declare Function GetCaretBlinkTime% Lib "User" ()
  170.     Declare Function GetCurrentTime& Lib "User" ()
  171.     Declare Function GetDoubleClickTime% Lib "User" ()
  172.     Declare Function GetFocus% Lib "User" ()
  173.     Declare Function GetInputState% Lib "User" ()
  174.     Declare Function GetKeyState% Lib "User" (ByVal nVirtKey%)
  175.     Declare Function GetMenu% Lib "User" (ByVal Hwnd%)
  176.     Declare Function GetMenuItemID% Lib "User" (ByVal hMenu%, ByVal nPos%)
  177.     Declare Function GetSubMenu% Lib "User" (ByVal hMenu%, ByVal nPos%)
  178.     Declare Function GetWindowWord% Lib "User" (ByVal Hwnd%, ByVal Index%)
  179.     Declare Sub HideCaret Lib "User" (ByVal Hwnd%)
  180.     Declare Function IsCharAlpha% Lib "User" (ByVal cChar%)
  181.     Declare Function IsCharAlphaNumeric% Lib "User" (ByVal cChar%)
  182.     Declare Function IsCharLower% Lib "User" (ByVal cChar%)
  183.     Declare Function IsCharUpper% Lib "User" (ByVal cChar%)
  184.     Declare Function LoadCursor% Lib "User" (ByVal hInstance%, ByVal CursorName$)
  185.     Declare Function ModifyMenu% Lib "User" (ByVal hMenu%, ByVal nPosition%, ByVal wFlags%, ByVal wIDNewItem%, ByVal lpNewItem&)
  186.     Declare Sub SetCaretBlinkTime Lib "User" (ByVal Milliseconds%)
  187.     Declare Function SetCursor% Lib "User" (ByVal hCursor%)
  188.     Declare Sub SetDoubleClickTime Lib "User" (ByVal Milliseconds%)
  189.     Declare Function SetMenuItemBitmaps% Lib "User" (ByVal hMenu%, ByVal nPosition%, ByVal wFlags%, ByVal hBitmapUnchecked%, ByVal hBitmapChecked%)
  190.     Declare Sub ShowCaret Lib "User" (ByVal Hwnd%)
  191.     Declare Function ShowWindow% Lib "User" (ByVal Hwnd%, ByVal nCmdShow%)
  192.     Declare Function WinHelp% Lib "User" (ByVal Hwnd%, ByVal HelpFile$, ByVal HelpCommand%, ByVal HelpData As Any)
  193.  
  194. '--------------------------------------------------------------------------
  195. ' These are the CONSTANT declarations for the Windows DLL routines
  196.  
  197. ' WinHelp values
  198.  
  199.     Global Const HELP_CONTEXT = 1
  200.     Global Const HELP_QUIT = 2
  201.     Global Const HELP_INDEX = 3
  202.     Global Const HELP_HELPONHELP = 4
  203.     Global Const HELP_SETINDEX = 5
  204.     Global Const HELP_KEY = &H101
  205.     Global Const HELP_MULTIKEY = &H201
  206.  
  207. ' Virtual key codes
  208.     Global Const VK_CAPITAL = &H14
  209.     Global Const VK_CONTROL = &H11
  210.     Global Const VK_INSERT = &H2D
  211.     Global Const VK_NUMLOCK = &H90
  212.     Global Const VK_OEM_SCROLL = &H91
  213.     Global Const VK_SHIFT = &H10
  214.  
  215. ' Menu flags and colors
  216.     Global Const CLR_MENUBAR = &H80000004
  217.     Global Const MF_BITMAP = &H4
  218.  
  219. ' ShowWindow routine nCmdShow%
  220.     Global Const SW_SHOWNORMAL = 1
  221.     Global Const SW_RESTORE = 9
  222.  
  223. ' Used with GetWindowsWord
  224.     Global Const GWW_HINSTANCE = -6
  225.  
  226. ' BitBlt and StretchBlt values for RasterOp&
  227.     Global Const BLACKNESS = &H42       ' CLS black
  228.     Global Const DSTINVERT = &H550009   ' Inverts destination bitmap
  229.     Global Const MERGECOPY = &HC000CA   ' Combines pattern and source bitmap using AND
  230.     Global Const MERGEPAINT = &HBB0226  ' Combines inverted source bitmap with destination bitmap using OR
  231.     Global Const NOTSRCCOPY = &H330008  ' Copies inverted source bitmap to destination
  232.     Global Const NOTSRCERASE = &H1100A6 ' Inverts result of combining destination and source bitmaps using OR
  233.     Global Const PATCOPY = &HF00021     ' Copies the pattern to destination bitmap
  234.     Global Const PATINVERT = &H5A0049   ' Copies destination bitmap with pattern using XOR
  235.     Global Const PATPAINT = &HFB0A09    ' Combines inverted source bitmap with pattern using OR.
  236.                     ' Combines that result with destination bitmap using OR.
  237.     Global Const SRCAND = &H8800C6      ' Combines pixels of dest and src bitmaps using AND
  238.     Global Const SRCCOPY = &HCC0020     ' Copies source bitmap to destination bitmap
  239.     Global Const SRCERASE = &H440328    ' Inverts destination bitmap and combines result with source using AND
  240.     Global Const SRCINVERT = &H660046   ' Combines pixels of dest and src bitmaps using XOR
  241.     Global Const SRCPAINT = &HEE0086    ' Combines pixels of dest and src bitmaps using OR
  242.     Global Const WHITENESS = &HFF0062   ' CLS white
  243.  
  244.