home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Tool Box
/
SIMS_2.iso
/
vb_code1
/
mem_mstr
/
memory.gbl
< prev
next >
Wrap
Text File
|
1992-01-20
|
12KB
|
244 lines
DefInt A-Z
Global CARD$(48)
Global A$(24)
Global UPBUTTON$, NUMFLAGS, MATCHES, GAMEBOARD
Global BUTTON1, BUTTON2, TRIES, PICKED
Global Const TRUE = -1, FALSE = 0
Type SCORERECORD
WINNER As String * 30
POINTS As Integer
DMY As String * 20
End Type
Global SCORE As SCORERECORD
'--------------------------------------------------------------------------
' These are the user-defined TYPE declarations for VBTOOLS.VBX
Type WinFlags
WF_80x87 As Integer ' True or false
WF_CPU As Integer ' 86,186,286,386,486
WF_MODE As Integer ' 1=Standard,2=386 enhanced
WF_FRAME As Integer ' 1=EMS large-frame, 2=EMS small-frame
End Type
'--------------------------------------------------------------------------
' These are the SUB and FUNCTION declarations for VBTOOLS.VBX
Declare Function Bload% Lib "vbtools.vbx" (ByVal Lin$, X As Any, ByVal Length&)
Declare Function Bsave% Lib "vbtools.vbx" (ByVal Lin$, X As Any, ByVal Length&)
Declare Function CVDMBF# Lib "vbtools.vbx" (Doub$)
Declare Function CVSMBF! Lib "vbtools.vbx" (Float$)
Declare Function CVI% Lib "vbtools.vbx" (ByVal Lin$)
Declare Function CVL& Lib "vbtools.vbx" (ByVal Lin$)
Declare Function CVS! Lib "vbtools.vbx" (ByVal Lin$)
Declare Function CVC@ Lib "vbtools.vbx" (ByVal Lin$)
Declare Function CVD# Lib "vbtools.vbx" (ByVal Lin$)
Declare Function MhBlue% Lib "vbtools.vbx" (ByVal xColor&)
Declare Function MhDefaultDrive% Lib "vbtools.vbx" ()
Declare Function MhDirectoryExists% Lib "vbtools.vbx" (A$)
Declare Function MhEcode% Lib "vbtools.vbx" ()
Declare Function MhExeName$ Lib "vbtools.vbx" (ByVal Hwnd As Integer)
Declare Function MHEXEPATH$ Lib "vbtools.vbx" (ByVal Hwnd As Integer)
Declare Function MhFileExists% Lib "vbtools.vbx" (A$)
Declare Function MhFileDateCompare% Lib "vbtools.vbx" (ByVal F1$, ByVal F2$)
Declare Function MhGreen% Lib "vbtools.vbx" (ByVal xColor&)
Declare Function MhKillFiles% Lib "vbtools.vbx" (ByVal Attr%, A$)
Declare Function MhRed% Lib "vbtools.vbx" (ByVal xColor&)
Declare Sub MhRgb Lib "vbtools.vbx" (ByVal xColor&, Red%, Green%, Blue%)
Declare Sub MhScrMono Lib "vbtools.vbx" (ByVal Lin$, ByVal Row%, ByVal Col%, ByVal Attr%)
Declare Function MhSetDefaultDrive% Lib "vbtools.vbx" (ByVal A%)
Declare Function MhSystemDir$ Lib "vbtools.vbx" ()
Declare Function MhWinDir$ Lib "vbtools.vbx" ()
Declare Sub MhWinFlags Lib "vbtools.vbx" (WindowsFlags As WinFlags)
Declare Function MhWinVersion% Lib "vbtools.vbx" (Major%, Minor%)
Declare Function MKI$ Lib "vbtools.vbx" (ByVal A%)
Declare Function MKL$ Lib "vbtools.vbx" (ByVal A&)
Declare Function MKD$ Lib "vbtools.vbx" (A#)
Declare Function MKDMBF$ Lib "vbtools.vbx" (Doubl#)
Declare Function MKS$ Lib "vbtools.vbx" (A!)
Declare Function MKSMBF$ Lib "vbtools.vbx" (Float!)
Declare Function MKC$ Lib "vbtools.vbx" (A@)
Declare Function Play% Lib "vbtools.vbx" (ByVal Lin$)
Declare Sub PlayStop Lib "vbtools.vbx" ()
'--------------------------------------------------------------------------
' These are the SUB and FUNCTION declarations for Windows KEYBOARD.DRV DLL
Declare Function GetKeyboardType% Lib "Keyboard.Drv" (ByVal nTypeFlag%)
'--------------------------------------------------------------------------
' These are the user-defined TYPE declarations for Windows GDI DLL
Type TextMetric ' Used with GetTextMetrics
TmHeight As Integer
TmAscent As Integer
TmDescent As Integer
TmInternalLeading As Integer
TmExternalLeading As Integer
TmAveCharWidth As Integer
TmMaxCharWidth As Integer
TmWeight As Integer
TmItalic As String * 1
TmUnderlined As String * 1
TmStruckOut As String * 1
TmFirstChar As String * 1
TmLastChar As String * 1
TmDefaultChar As String * 1
TmBreakChar As String * 1
TmPitchAndFamily As String * 1
TmCharSet As String * 1
tOverhang As Integer
TmDigitizedAspectX As Integer
TmDigitizedAspectY As Integer
End Type
'--------------------------------------------------------------------------
' These are the SUB and FUNCTION declarations for Windows GDI DLL
Declare Function GetTextExtent& Lib "Gdi" (ByVal hDC%, ByVal lpString$, ByVal nCount%)
Declare Function BitBlt% Lib "Gdi" (ByVal destDC%, ByVal X%, ByVal Y%, ByVal W%, ByVal H%, ByVal srcDC%, ByVal xSrc%, ByVal ySrc%, ByVal RasterOp&)
' BitBlt moves a bitmap from the
' source device to the destination
' device. See the CONST section for
' values for RasterOp&.
Declare Function GetTextMetrics% Lib "Gdi" (ByVal hDC%, A As TextMetric)
Declare Function GetTextCharacterExtra% Lib "Gdi" (ByVal hDC%)
Declare Function SetStretchBltMode% Lib "Gdi" (ByVal DestHdc%, ByVal StretchMode%)
' This function sets the stretching
' mode for the StretchBlt function.
' The stretching mode determines
' which scan lines and/or columns
' StretchBlt eliminates when
' contracting a bitmap.
' StretchMode% is one of:
Global Const BLACKONWHITE = 1
' AND in the eliminated lines.
' Preserves black pixels at
' the expense of white pixels
' by using the AND operator
' on the eliminated lines and
' those remaining.
Global Const WHITEONBLACK = 2
' OR in the eliminated lines.
' Preserves white pixels at
' the expense of black pixels
' by using the OR operator
' on the eliminated lines and
' those remaining.
Global Const COLORONCOLOR = 3
' Deletes the eliminated lines
' without preserving their
' information.
Declare Function SetTextCharacterExtra% Lib "Gdi" (ByVal hDC%, ByVal nCharExtra%)
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&)
' StretchBlt moves a bitmap from a
' source rectangle to a destination
' rectangle, stretching or
' compressing the bitmap if
' necessary to fit the dimensions
' of the destination rectangle.
' Also see SetStretchBltMode.
' See the CONST section for
' values for RasterOp&.
'--------------------------------------------------------------------------
' These are the SUB and FUNCTION declarations for Windows KERNEL DLL
Declare Function GetModuleFileName% Lib "Kernel" (ByVal hModule%, ByVal FileName$, ByVal nSize%)
Declare Function GetPrivateProfileString% Lib "Kernel" (ByVal AppName$, ByVal KeyName$, ByVal Default$, ByVal ReturnedString$, ByVal nSize%, ByVal PFileName$)
Declare Function LoadLibrary% Lib "Kernel" (ByVal LibName$)
Declare Function WritePrivateProfileString% Lib "Kernel" (ByVal AppName$, ByVal KeyName$, ByVal PString$, ByVal PFileName$)
'--------------------------------------------------------------------------
' These are the SUB and FUNCTION declarations for Windows USER DLL
Declare Sub CreateCaret Lib "User" (ByVal Hwnd%, ByVal hBiTmap%, ByVal nWidth%, ByVal nHeight%)
Declare Sub DestroyCaret Lib "User" ()
Declare Function EnableHardwareInput% Lib "User" (ByVal TrueOrFalse%)
Declare Function ExitWindows% Lib "User" (ByVal dwReserved&, ByVal wReturnCode%)
Declare Function FlashWindow% Lib "User" (ByVal Hwnd%, ByVal bInvert%)
Declare Function GetCaretBlinkTime% Lib "User" ()
Declare Function GetCurrentTime& Lib "User" ()
Declare Function GetDoubleClickTime% Lib "User" ()
Declare Function GetFocus% Lib "User" ()
Declare Function GetInputState% Lib "User" ()
Declare Function GetKeyState% Lib "User" (ByVal nVirtKey%)
Declare Function GetMenu% Lib "User" (ByVal Hwnd%)
Declare Function GetMenuItemID% Lib "User" (ByVal hMenu%, ByVal nPos%)
Declare Function GetSubMenu% Lib "User" (ByVal hMenu%, ByVal nPos%)
Declare Function GetWindowWord% Lib "User" (ByVal Hwnd%, ByVal Index%)
Declare Sub HideCaret Lib "User" (ByVal Hwnd%)
Declare Function IsCharAlpha% Lib "User" (ByVal cChar%)
Declare Function IsCharAlphaNumeric% Lib "User" (ByVal cChar%)
Declare Function IsCharLower% Lib "User" (ByVal cChar%)
Declare Function IsCharUpper% Lib "User" (ByVal cChar%)
Declare Function LoadCursor% Lib "User" (ByVal hInstance%, ByVal CursorName$)
Declare Function ModifyMenu% Lib "User" (ByVal hMenu%, ByVal nPosition%, ByVal wFlags%, ByVal wIDNewItem%, ByVal lpNewItem&)
Declare Sub SetCaretBlinkTime Lib "User" (ByVal Milliseconds%)
Declare Function SetCursor% Lib "User" (ByVal hCursor%)
Declare Sub SetDoubleClickTime Lib "User" (ByVal Milliseconds%)
Declare Function SetMenuItemBitmaps% Lib "User" (ByVal hMenu%, ByVal nPosition%, ByVal wFlags%, ByVal hBitmapUnchecked%, ByVal hBitmapChecked%)
Declare Sub ShowCaret Lib "User" (ByVal Hwnd%)
Declare Function ShowWindow% Lib "User" (ByVal Hwnd%, ByVal nCmdShow%)
Declare Function WinHelp% Lib "User" (ByVal Hwnd%, ByVal HelpFile$, ByVal HelpCommand%, ByVal HelpData As Any)
'--------------------------------------------------------------------------
' These are the CONSTANT declarations for the Windows DLL routines
' WinHelp values
Global Const HELP_CONTEXT = 1
Global Const HELP_QUIT = 2
Global Const HELP_INDEX = 3
Global Const HELP_HELPONHELP = 4
Global Const HELP_SETINDEX = 5
Global Const HELP_KEY = &H101
Global Const HELP_MULTIKEY = &H201
' Virtual key codes
Global Const VK_CAPITAL = &H14
Global Const VK_CONTROL = &H11
Global Const VK_INSERT = &H2D
Global Const VK_NUMLOCK = &H90
Global Const VK_OEM_SCROLL = &H91
Global Const VK_SHIFT = &H10
' Menu flags and colors
Global Const CLR_MENUBAR = &H80000004
Global Const MF_BITMAP = &H4
' ShowWindow routine nCmdShow%
Global Const SW_SHOWNORMAL = 1
Global Const SW_RESTORE = 9
' Used with GetWindowsWord
Global Const GWW_HINSTANCE = -6
' BitBlt and StretchBlt values for RasterOp&
Global Const BLACKNESS = &H42 ' CLS black
Global Const DSTINVERT = &H550009 ' Inverts destination bitmap
Global Const MERGECOPY = &HC000CA ' Combines pattern and source bitmap using AND
Global Const MERGEPAINT = &HBB0226 ' Combines inverted source bitmap with destination bitmap using OR
Global Const NOTSRCCOPY = &H330008 ' Copies inverted source bitmap to destination
Global Const NOTSRCERASE = &H1100A6 ' Inverts result of combining destination and source bitmaps using OR
Global Const PATCOPY = &HF00021 ' Copies the pattern to destination bitmap
Global Const PATINVERT = &H5A0049 ' Copies destination bitmap with pattern using XOR
Global Const PATPAINT = &HFB0A09 ' Combines inverted source bitmap with pattern using OR.
' Combines that result with destination bitmap using OR.
Global Const SRCAND = &H8800C6 ' Combines pixels of dest and src bitmaps using AND
Global Const SRCCOPY = &HCC0020 ' Copies source bitmap to destination bitmap
Global Const SRCERASE = &H440328 ' Inverts destination bitmap and combines result with source using AND
Global Const SRCINVERT = &H660046 ' Combines pixels of dest and src bitmaps using XOR
Global Const SRCPAINT = &HEE0086 ' Combines pixels of dest and src bitmaps using OR
Global Const WHITENESS = &HFF0062 ' CLS white