home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l408 / 1.img / MAIN.EXE / VBTOOLS.BI < prev    next >
Encoding:
Text File  |  1992-12-07  |  21.8 KB  |  479 lines

  1. Global Const TRUE = -1, FALSE = 0
  2.  
  3. '--------------------------------------------------------------------------
  4. ' These are the user-defined TYPE declarations for VBTOOLS  .VBX files
  5.  
  6.     Type WinFlags
  7.  
  8.       WF_80x87 As Integer ' True or false
  9.       WF_CPU   As Integer ' 86,186,286,386,486
  10.       WF_MODE  As Integer ' 1=Standard,2=386 enhanced
  11.       WF_FRAME As Integer ' 1=EMS large-frame, 2=EMS small-frame
  12.  
  13.     End Type
  14. '--------------------------------------------------------------------------
  15. ' The following routines are present in both VBTOOLS   .VBX files and
  16. ' VBMUSCLE.VBX. If you wish to use both products in the same application,
  17. ' be sure to delete these lines from the copy of this file that you place
  18. ' into your application. Do **NOT** remove these lines from the master
  19. ' copy of VBTOOLS.BI!!!
  20.  
  21. '---------------------------------------------------------------------------
  22.     Type MhChooseFontType
  23.  
  24. ' Special TYPEs used by MhChooseFont
  25.      hwnd   As Integer      ' Form's hwnd
  26.      hdc    As Integer      ' Identifies device or information
  27.                 ' context of the printer listed
  28.             ' in the dialog box. Use MhPrintDlg
  29.             ' to select printer and set the
  30.             ' PD_RETURNDC or PD_RETURNIC flags.
  31.             ' Use Form.HDC to get screen fonts.
  32.             ' In either case, you must also
  33.             ' specify CF_PRINTERFONTS flag,otherwise
  34.             ' this is ignored.
  35.      logfont    As Long         ' Used internally
  36.      PointSize  As Integer      ' In units of 1/10th of a point
  37.      Flags  As Long         ' See below
  38.      RgbColor   As Long         ' If the CF_EFFECTS flag is set, this field contains an RGB value which the
  39.             ' ChooseFont function should use to set the text color. After the user
  40.             ' dismisses the dialog, this field contains the RGB value of the color which the
  41.             ' user selected.
  42.      Reserved2  As Long         ' Used internally
  43.      Reserved3  As Long         ' Ditto
  44.      Reserved4  As Long         ' Ditto
  45.      Reserved5  As Integer      ' Ditto
  46.      Reserved6  As Long         ' Ditto
  47.      FontType   As Integer      ' Specifies the type of the selected font:
  48.             '  SIMULATED_FONTTYPE   Specifies that the font is simulated by GDI.
  49.             '  PRINTER_FONTTYPE Specifies that the font is a printer font.
  50.             '  SCREEN_FONTTYPE  Specifies that the font is a screen font.
  51.      MinSize    As Integer      ' If the CF_LIMITSIZE flag is set, this specifies
  52.                 ' the minimum allowable point size.
  53.      MaxSize    As Integer      ' Same as MinSize but for maximum
  54.     End Type
  55.     Type mhlogfonttype
  56.         FontHeight As Integer
  57.         FontWidth As Integer
  58.         FontEscapement As Integer
  59.         FontOrientation As Integer
  60.         FontWeight As Integer
  61.         FontItalic As String * 1
  62.         FontUnderline As String * 1
  63.         FontStrikeout As String * 1
  64.         FontCharSet As String * 1
  65.         FontOutPrecision As String * 1
  66.         FontClipPrecision As String * 1
  67.         FontQuality As String * 1
  68.         FontPitchAndFamily As String * 1
  69.         FontFaceName As String * 32
  70.     End Type
  71.  
  72. '---------------------------------------------------------------------------
  73.     Type MhPrintDlgType
  74. ' Special TYPE used by MhPrintDlg
  75.  
  76.          hwnd As Integer            ' hWnd of your form
  77.          DevMode As Integer         ' Used by other routines
  78.                     ' If non-zero on entry, used as default
  79.                     ' (should be zero first time you call
  80.                     '  to get default printer values loaded)
  81.          DevNames As Integer        ' Used by other routines
  82.                     ' If non-zero on entry, used as default
  83.                     ' (should be zero first time you call
  84.                     '  to get default printer values loaded)
  85.          hdc As Integer             ' Used by other routines
  86.                     ' If non-zero on entry, used as default
  87.                     ' (should be zero first time you call
  88.                     '  to get default printer values loaded)
  89.          Flags As Long              ' See below
  90.          FromPage As Integer        ' First page to print
  91.          ToPage As Integer          ' Last page to print
  92.          MinPage As Integer         ' Minimum allowed value in From/To controls
  93.          MaxPage As Integer         ' Maximum ""
  94.          Copies As Integer          ' How many copies?
  95.     End Type
  96.  
  97. Type MhGetFileType
  98. ' Special TYPEs used by File Dialog routines
  99.  
  100.      hwnd As Integer            ' Form's hWnd
  101.      FilterIndex As Long        ' Which Filter to use as default
  102.      InitFileName As String     ' Used to initialize File Name edit control
  103.      FormCaption As String      ' Caption for File Form
  104.      InitDir As String          ' Initial directory. Null for CurDir$
  105.      DefaultExtension As String     ' Default extension to use (no period)
  106.      HowManyFilters As Integer      ' In the other array
  107.      Flags As Long          ' See manual
  108.      RawNamePos As Integer      ' Returned as Instr in Result$ where raw file name begins
  109.      ExtensionPos As Integer        ' Returned as Instr in Result$ where extension begins
  110. End Type
  111.  
  112. Type MhFileFilterType
  113.      Description As String      ' i.e., "Text Files"
  114.      Mask As String         '       "*.txt;*.doc;*.bas
  115. End Type
  116.  
  117. ' MhChooseColor values
  118. Global Const CC_CANCELLED = -100
  119. Global Const CC_RGBINIT = 1
  120. Global Const CC_FULLOPEN = 2
  121. Global Const CC_PREVENTFULLOPEN = 4
  122. Global Const CC_SHOWHELP = 8
  123.  
  124. ' MhGetOpenFileName and MhGetSaveFileName Values
  125. Global Const OFN_READONLY = &H1
  126. Global Const OFN_OVERWRITEPROMPT = &H2
  127. Global Const OFN_HIDEREADONLY = &H4
  128. Global Const OFN_NOCHANGEDIR = &H8
  129. Global Const OFN_SHOWHELP = &H10
  130. Global Const OFN_EXTENTIONDIFFERENT = &H400
  131. Global Const OFN_PATHMUSTEXIST = &H800
  132. Global Const OFN_FILEMUSTEXIST = &H1000
  133. Global Const OFN_CREATEPROMPT = &H2000
  134. Global Const OF_SHARE_EXCLUSIVE = &H10
  135. Global Const OF_SHARE_DENY_WRITE = &H20
  136. Global Const OF_SHARE_DENY_READ = &H30
  137. Global Const OF_SHARE_DENY_NONE = &H40
  138. Global Const OF_CANCEL = &H800
  139. Global Const OF_PROMPT = &H2000
  140.  
  141. ' MhFindText and MhReplaceText Values
  142. Global Const FR_DOWN = &H1
  143. Global Const FR_WHOLEWORD = &H2
  144. Global Const FR_MATCHCASE = &H4
  145. Global Const FR_FINDNEXT = &H8
  146. Global Const FR_REPLACE = &H10
  147. Global Const FR_REPLACEALL = &H20
  148. Global Const FR_SHOWHELP = &H80
  149. Global Const FR_NOUPDOWN = &H400
  150. Global Const FR_NOMATCHCASE = &H800
  151. Global Const FR_NOWHOLEWORD = &H1000
  152.  
  153. ' MhPrintDlg Values
  154. Global Const PD_ALLPAGES = &H0
  155. Global Const PD_SELECTION = &H1
  156. Global Const PD_PAGENUMS = &H2
  157. Global Const PD_NOSELECTION = &H4
  158. Global Const PD_NOPAGENUMS = &H8
  159. Global Const PD_COLLATE = &H10
  160. Global Const PD_PRINTTOFILE = &H20
  161. Global Const PD_PRINTSETUP = &H40
  162. Global Const PD_NOWARNING = &H80
  163. Global Const PD_RETURNDC = &H100
  164. Global Const PD_RETURNIC = &H200
  165. Global Const PD_RETURNDEFAULT = &H400
  166. Global Const PD_SHOWHELP = &H800
  167. Global Const PD_ENABLEPRINTHOOK = &H1000
  168. Global Const PD_ENABLESETUPHOOK = &H2000
  169. Global Const PD_ENABLEPRINTTEMPLATE = &H4000
  170. Global Const PD_ENABLESETUPTEMPLATE = &H8000
  171. Global Const PD_ENABLEPRINTTEMPLATEHANDLE = &H10000
  172. Global Const PD_ENABLESETUPTEMPLATEHANDLE = &H20000
  173. Global Const PD_USEDEVMODECOPIES = &H40000
  174. Global Const ANSI_CHARSET = 0
  175. Global Const SYMBOL_CHARSET = 2
  176. Global Const SHIFTJIS_CHARSET = 128
  177. Global Const OEM_CHARSET = 255
  178. Global Const DEFAULT_QUALITY = 0
  179. Global Const DRAFT_QUALITY = 1
  180. Global Const PROOF_QUALITY = 2
  181. Global Const DEFAULT_PITCH = 0
  182. Global Const FIXED_PITCH = 1
  183. Global Const VARIABLE_PITCH = 2
  184.     
  185. ' Font Families
  186. Global Const FF_DONTCARE = 0  ' Don't care or don't know.
  187. Global Const FF_ROMAN = 16    ' Variable stroke width, serifed. Times Roman, Century Schoolbook, etc.
  188. Global Const FF_SWISS = 32    ' Variable stroke width, sans-serifed. Helvetica, Swiss, etc.
  189. Global Const FF_MODERN = 48   ' Constant stroke width, serifed or sans-serifed. Pica, Elite, Courier, etc.
  190. Global Const FF_SCRIPT = 64   ' Cursive, etc.
  191. Global Const FF_DECORATIVE = 80 ' Old English, etc.
  192.  
  193. ' Font Weights
  194. Global Const FW_DONTCARE = 0
  195. Global Const FW_THIN = 100
  196. Global Const FW_EXTRALIGHT = 200
  197. Global Const FW_LIGHT = 300
  198. Global Const FW_NORMAL = 400
  199. Global Const FW_MEDIUM = 500
  200. Global Const FW_SEMIBOLD = 600
  201. Global Const FW_BOLD = 700
  202. Global Const FW_EXTRABOLD = 800
  203. Global Const FW_HEAVY = 900
  204. Global Const FW_ULTRALIGHT = FW_EXTRALIGHT
  205. Global Const FW_REGULAR = FW_NORMAL
  206. Global Const FW_DEMIBOLD = FW_SEMIBOLD
  207. Global Const FW_ULTRABOLD = FW_EXTRABOLD
  208. Global Const FW_BLACK = FW_HEAVY
  209.  
  210. ' MhChooseFont Values
  211. Global Const CF_SCREENFONTS = &H1
  212. Global Const CF_PRINTERFONTS = &H2
  213. Global Const CF_BOTH = &H3  '  (CF_SCREENFONTS | CF_PRINTERFONTS)
  214. Global Const CF_SHOWHELP = &H4
  215. Global Const CF_EFFECTS = &H100
  216. Global Const CF_APPLY = &H200
  217. Global Const CF_ANSIONLY = &H400
  218. Global Const CF_NOVECTORFONTS = &H800
  219. Global Const CF_NOSIMULATIONS = &H1000
  220. Global Const CF_LIMITSIZE = &H2000
  221. Global Const CF_FIXEDPITCHONLY = &H4000
  222. Global Const CF_WYSIWYG = &H8000              '  must also have CF_SCREENFONTS & CF_PRINTERFONTS
  223. Global Const CF_FORCEFONTEXIST = &H10000
  224. Global Const CF_SCALABLEONLY = &H20000
  225. Global Const CF_TTONLY = &H40000
  226. Global Const SIMULATED_FONTTYPE = &H8000
  227. Global Const PRINTER_FONTTYPE = &H4000
  228. Global Const SCREEN_FONTTYPE = &H2000
  229.  
  230.     Declare Function CVDMBF# Lib "mhas200.vbx" (Doub$)
  231.     Declare Function CVSMBF! Lib "mhas200.vbx" (Float$)
  232.     Declare Function CVI% Lib "mhas200.vbx" (ByVal Lin$)
  233.     Declare Function CVL& Lib "mhas200.vbx" (ByVal Lin$)
  234.     Declare Function CVS! Lib "mhas200.vbx" (ByVal Lin$)
  235.     Declare Function CVC@ Lib "mhas200.vbx" (ByVal Lin$)
  236.     Declare Function CVD# Lib "mhas200.vbx" (ByVal Lin$)
  237.     Declare Function MhCtrlHwnd% Lib "mhas200.vbx" (X As Control)
  238.     Declare Function MhDefaultDrive% Lib "mhas200.vbx" ()
  239.     Declare Function MhDirectoryExists% Lib "mhas200.vbx" (ByVal A$)
  240.     Declare Function MhEcode% Lib "mhas200.vbx" ()
  241.     Declare Function MhExeName$ Lib "mhas200.vbx" (ByVal hwnd As Integer)
  242.     Declare Function MhExePath$ Lib "mhas200.vbx" (ByVal hwnd As Integer)
  243.     Declare Function MhFileExists% Lib "mhas200.vbx" (ByVal A$)
  244.     Declare Function MhFileDateCompare% Lib "mhas200.vbx" (ByVal F1$, ByVal F2$)
  245.     Declare Function MhKillFiles% Lib "mhas200.vbx" (ByVal Attr%, ByVal A$)
  246.     Declare Sub MhScrMono Lib "mhas200.vbx" (ByVal Lin$, ByVal Row%, ByVal Col%, ByVal Attr%)
  247.     Declare Function MhSetDefaultDrive% Lib "mhas200.vbx" (ByVal A%)
  248.     Declare Function MhSystemDir$ Lib "mhas200.vbx" ()
  249.     Declare Function MhWinDir$ Lib "mhas200.vbx" ()
  250.     Declare Sub MhWinFlags Lib "mhas200.vbx" (WindowsFlags As WinFlags)
  251.     Declare Function MhWinVersion% Lib "mhas200.vbx" (Major%, Minor%)
  252.     Declare Function MKI$ Lib "mhas200.vbx" (ByVal A%)
  253.     Declare Function MKL$ Lib "mhas200.vbx" (ByVal A&)
  254.     Declare Function MKD$ Lib "mhas200.vbx" (A#)
  255.     Declare Function MKDMBF$ Lib "mhas200.vbx" (Doubl#)
  256.     Declare Function MKS$ Lib "mhas200.vbx" (A!)
  257.     Declare Function MKSMBF$ Lib "mhas200.vbx" (Float!)
  258.     Declare Function MKC$ Lib "mhas200.vbx" (A@)
  259.     Declare Function MhChooseColor& Lib "mhas200.vbx" (ByVal hwnd%, ByVal DefaultColor&, CustomColors&, ByVal Flags&)
  260.     Declare Function MhChooseFont% Lib "mhas200.vbx" (Y As mhlogfonttype, X As MhChooseFontType)
  261.     Declare Function MhGetOpenFileName$ Lib "mhas200.vbx" (X As MhGetFileType, Y As MhFileFilterType)
  262.     Declare Function MhGetSaveFileName$ Lib "mhas200.vbx" (X As MhGetFileType, Y As MhFileFilterType)
  263.     Declare Function MhChooseColor& Lib "mhas200.vbx" (ByVal hwnd%, ByVal DefaultColor&, CustomColors&, ByVal Flags&)
  264.     Declare Function MhFindText% Lib "mhas200.vbx" (ByVal KeyCode%, ByVal hwnd%, Flags&, Find$)
  265.     Declare Function MhReplaceText% Lib "mhas200.vbx" (Replace$, ByVal KeyCode%, ByVal hwnd%, Flags&, Find$)
  266.     Declare Function MhLoadCommDlg% Lib "mhas200.vbx" ()
  267.     Declare Function MhSetFont% Lib "mhas200.vbx" (ByVal hwnd%, ByVal RedrawNow%, Y As mhlogfonttype)
  268.     Declare Function MhPrintDlg% Lib "mhas200.vbx" (X As MhPrintDlgType)
  269.     Declare Function MhPrintDlgDef% Lib "mhas200.vbx" (X As MhPrintDlgType)
  270.     Declare Function MhGetTextDialog% Lib "mhas200.vbx" (Replace$, Flags&, Find$)
  271.     Declare Sub MhKillDialog Lib "mhas200.vbx" ()
  272.     Declare Function MhGetFileTitle$ Lib "mhas200.vbx" (ByVal A$)
  273.  
  274. '--------------------------------------------------------------------------
  275. ' These are the SUB and FUNCTION declarations for VBTOOLS  .VBX files
  276.   
  277.     Declare Function Bload% Lib "mhas200.vbx" (ByVal Lin$, X As Any, ByVal Length&)
  278.     Declare Function Bsave% Lib "mhas200.vbx" (ByVal Lin$, X As Any, ByVal Length&)
  279.     Declare Function MhBlue% Lib "mhas200.vbx" (ByVal xColor&)
  280.     Declare Function MhGreen% Lib "mhas200.vbx" (ByVal xColor&)
  281.     Declare Function MhRed% Lib "mhas200.vbx" (ByVal xColor&)
  282.     Declare Sub MhRgb Lib "mhas200.vbx" (ByVal xColor&, Red%, Green%, Blue%)
  283.     Declare Function Play% Lib "mhas200.vbx" (ByVal Lin$)
  284.     Declare Sub PlayStop Lib "mhas200.vbx" ()
  285.  
  286. '--------------------------------------------------------------------------
  287. ' These are the SUB and FUNCTION declarations for VBTOOLS MhCallBack custom control
  288.  
  289. Declare Function MhEnumChildWindows Lib "mhad200.vbx" (ByVal hwnd As Integer, ByVal elements As Integer, hwndarray%) As Integer
  290. Declare Function MhEnumFonts Lib "mhad200.vbx" (ByVal hdc As Integer, ByVal elements As Integer, hwndarray As mhlogfonttype) As Integer
  291.  
  292. Declare Function MhEnumClipboardFormats Lib "mhad200.vbx" (ByVal hwnd As Integer, ByVal elements As Integer, formatarray%) As Integer
  293.     'Clipboard Formats
  294.     Global Const CF_TEXT = 1
  295.     Global Const CF_BITMAP = 2
  296.     Global Const CF_METAFILEPICT = 3
  297.     Global Const SYLK = 4
  298.     Global Const DIF = 5
  299.     Global Const TIFF = 6
  300.     Global Const CF_OEMTEXT = 7
  301.     Global Const CF_DIB = 8
  302.     Global Const PALETTE = 9
  303.     Global Const PENDATA = 10
  304.     Global Const RIFF = 11
  305.     Global Const WAVE = 12
  306.  
  307. '--------------------------------------------------------------------------
  308. ' These are the SUB and FUNCTION declarations for Windows KEYBOARD.DRV DLL
  309.  
  310.     Declare Function GetKeyboardType% Lib "Keyboard.Drv" (ByVal nTypeFlag%)
  311.  
  312. '--------------------------------------------------------------------------
  313. ' These are the user-defined TYPE declarations for Windows GDI DLL
  314.  
  315.     Type TextMetric ' Used with GetTextMetrics
  316.       TmHeight As Integer
  317.       TmAscent As Integer
  318.       TmDescent As Integer
  319.       TmInternalLeading As Integer
  320.       TmExternalLeading As Integer
  321.       TmAveCharWidth As Integer
  322.       TmMaxCharWidth As Integer
  323.       TmWeight As Integer
  324.       TmItalic As String * 1
  325.       TmUnderlined As String * 1
  326.       TmStruckOut As String * 1
  327.       TmFirstChar As String * 1
  328.       TmLastChar As String * 1
  329.       TmDefaultChar As String * 1
  330.       TmBreakChar As String * 1
  331.       TmPitchAndFamily As String * 1
  332.       TmCharSet As String * 1
  333.       tOverhang As Integer
  334.       TmDigitizedAspectX As Integer
  335.       TmDigitizedAspectY As Integer
  336.     End Type
  337.  
  338. '--------------------------------------------------------------------------
  339. ' These are the SUB and FUNCTION declarations for Windows GDI DLL
  340.  
  341.     Declare Function GetTextExtent& Lib "Gdi" (ByVal hdc%, ByVal lpString$, ByVal nCount%)
  342.     Declare Function BitBlt% Lib "Gdi" (ByVal destDC%, ByVal X%, ByVal Y%, ByVal W%, ByVal H%, ByVal srcDC%, ByVal xSrc%, ByVal ySrc%, ByVal RasterOp&)
  343.       ' BitBlt moves a bitmap from the
  344.       ' source device to the destination
  345.       ' device. See the CONST section for
  346.       ' values for RasterOp&.
  347.     Declare Function GetTextMetrics% Lib "Gdi" (ByVal hdc%, A As TextMetric)
  348.     Declare Function GetTextCharacterExtra% Lib "Gdi" (ByVal hdc%)
  349.     Declare Function SetStretchBltMode% Lib "Gdi" (ByVal DestHdc%, ByVal StretchMode%)
  350.       ' This function sets the stretching
  351.       ' mode for the StretchBlt function.
  352.       ' The stretching mode determines
  353.       ' which scan lines and/or columns
  354.       ' StretchBlt eliminates when
  355.       ' contracting a bitmap.
  356.       ' StretchMode% is one of:
  357.       Global Const BLACKONWHITE = 1
  358.     ' AND in the eliminated lines.
  359.     ' Preserves black pixels at
  360.     ' the expense of white pixels
  361.     ' by using the AND operator
  362.     ' on the eliminated lines and
  363.     ' those remaining.
  364.       Global Const WHITEONBLACK = 2
  365.     ' OR in the eliminated lines.
  366.     ' Preserves white pixels at
  367.     ' the expense of black pixels
  368.     ' by using the OR operator
  369.     ' on the eliminated lines and
  370.     ' those remaining.
  371.       Global Const COLORONCOLOR = 3
  372.     ' Deletes the eliminated lines
  373.     ' without preserving their
  374.     ' information.
  375.  
  376.     Declare Function SetTextCharacterExtra% Lib "Gdi" (ByVal hdc%, ByVal nCharExtra%)
  377.     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&)
  378.       ' StretchBlt moves a bitmap from a
  379.       ' source rectangle to a destination
  380.       ' rectangle, stretching or
  381.       ' compressing the bitmap if
  382.       ' necessary to fit the dimensions
  383.       ' of the destination rectangle.
  384.       ' Also see SetStretchBltMode.
  385.       ' See the CONST section for
  386.       ' values for RasterOp&.
  387.  
  388. '--------------------------------------------------------------------------
  389. ' These are the SUB and FUNCTION declarations for Windows KERNEL DLL
  390.  
  391.     Declare Function GetModuleFileName% Lib "Kernel" (ByVal hModule%, ByVal FileName$, ByVal nSize%)
  392.     Declare Function GetPrivateProfileString% Lib "Kernel" (ByVal AppName$, ByVal KeyName$, ByVal Default$, ByVal ReturnedString$, ByVal nSize%, ByVal PFileName$)
  393.     Declare Function LoadLibrary% Lib "Kernel" (ByVal LibName$)
  394.     Declare Function WritePrivateProfileString% Lib "Kernel" (ByVal AppName$, ByVal KeyName$, ByVal PString$, ByVal PFileName$)
  395.  
  396. '--------------------------------------------------------------------------
  397. ' These are the SUB and FUNCTION declarations for Windows USER DLL
  398.  
  399.     Declare Sub CreateCaret Lib "User" (ByVal hwnd%, ByVal hBiTmap%, ByVal nWidth%, ByVal nHeight%)
  400.     Declare Sub DestroyCaret Lib "User" ()
  401.     Declare Function EnableHardwareInput% Lib "User" (ByVal TrueOrFalse%)
  402.     Declare Function ExitWindows% Lib "User" (ByVal dwReserved&, ByVal wReturnCode%)
  403.     Declare Function FlashWindow% Lib "User" (ByVal hwnd%, ByVal bInvert%)
  404.     Declare Function GetCaretBlinkTime% Lib "User" ()
  405.     Declare Function GetCurrentTime& Lib "User" ()
  406.     Declare Function GetDoubleClickTime% Lib "User" ()
  407.     Declare Function GetFocus% Lib "User" ()
  408.     Declare Function GetInputState% Lib "User" ()
  409.     Declare Function GetKeyState% Lib "User" (ByVal nVirtKey%)
  410.     Declare Function GetMenu% Lib "User" (ByVal hwnd%)
  411.     Declare Function GetMenuItemID% Lib "User" (ByVal hMenu%, ByVal nPos%)
  412.     Declare Function GetSubMenu% Lib "User" (ByVal hMenu%, ByVal nPos%)
  413.     Declare Function GetWindowWord% Lib "User" (ByVal hwnd%, ByVal Index%)
  414.     Declare Sub HideCaret Lib "User" (ByVal hwnd%)
  415.     Declare Function IsCharAlpha% Lib "User" (ByVal cChar%)
  416.     Declare Function IsCharAlphaNumeric% Lib "User" (ByVal cChar%)
  417.     Declare Function IsCharLower% Lib "User" (ByVal cChar%)
  418.     Declare Function IsCharUpper% Lib "User" (ByVal cChar%)
  419.     Declare Function LoadCursor% Lib "User" (ByVal hInstance%, ByVal CursorName$)
  420.     Declare Function ModifyMenu% Lib "User" (ByVal hMenu%, ByVal nPosition%, ByVal wFlags%, ByVal wIDNewItem%, ByVal lpNewItem&)
  421.     Declare Sub SetCaretBlinkTime Lib "User" (ByVal Milliseconds%)
  422.     Declare Function SetCursor% Lib "User" (ByVal hCursor%)
  423.     Declare Sub SetDoubleClickTime Lib "User" (ByVal Milliseconds%)
  424.     Declare Function SetMenuItemBitmaps% Lib "User" (ByVal hMenu%, ByVal nPosition%, ByVal wFlags%, ByVal hBitmapUnchecked%, ByVal hBitmapChecked%)
  425.     Declare Sub ShowCaret Lib "User" (ByVal hwnd%)
  426.     Declare Function ShowWindow% Lib "User" (ByVal hwnd%, ByVal nCmdShow%)
  427.     Declare Function WinHelp% Lib "User" (ByVal hwnd%, ByVal HelpFile$, ByVal HelpCommand%, ByVal HelpData As Any)
  428.  
  429. '--------------------------------------------------------------------------
  430. ' These are the CONSTANT declarations for the Windows DLL routines
  431.  
  432. ' WinHelp values
  433.  
  434.     Global Const HELP_CONTEXT = 1
  435.     Global Const HELP_QUIT = 2
  436.     Global Const HELP_INDEX = 3
  437.     Global Const HELP_HELPONHELP = 4
  438.     Global Const HELP_SETINDEX = 5
  439.     Global Const HELP_KEY = &H101
  440.     Global Const HELP_MULTIKEY = &H201
  441.  
  442. ' Virtual key codes
  443.     Global Const VK_CAPITAL = &H14
  444.     Global Const VK_CONTROL = &H11
  445.     Global Const VK_INSERT = &H2D
  446.     Global Const VK_NUMLOCK = &H90
  447.     Global Const VK_OEM_SCROLL = &H91
  448.     Global Const VK_SHIFT = &H10
  449.  
  450. ' Menu flags and colors
  451.     Global Const CLR_MENUBAR = &H80000004
  452.     Global Const MF_BITMAP = &H4
  453.  
  454. ' ShowWindow routine nCmdShow%
  455.     Global Const SW_SHOWNORMAL = 1
  456.     Global Const SW_RESTORE = 9
  457.  
  458. ' Used with GetWindowsWord
  459.     Global Const GWW_HINSTANCE = -6
  460.  
  461. ' BitBlt and StretchBlt values for RasterOp&
  462.     Global Const BLACKNESS = &H42       ' CLS black
  463.     Global Const DSTINVERT = &H550009   ' Inverts destination bitmap
  464.     Global Const MERGECOPY = &HC000CA   ' Combines pattern and source bitmap using AND
  465.     Global Const MERGEPAINT = &HBB0226  ' Combines inverted source bitmap with destination bitmap using OR
  466.     Global Const NOTSRCCOPY = &H330008  ' Copies inverted source bitmap to destination
  467.     Global Const NOTSRCERASE = &H1100A6 ' Inverts result of combining destination and source bitmaps using OR
  468.     Global Const PATCOPY = &HF00021     ' Copies the pattern to destination bitmap
  469.     Global Const PATINVERT = &H5A0049   ' Copies destination bitmap with pattern using XOR
  470.     Global Const PATPAINT = &HFB0A09    ' Combines inverted source bitmap with pattern using OR.
  471.                     ' Combines that result with destination bitmap using OR.
  472.     Global Const SRCAND = &H8800C6      ' Combines pixels of dest and src bitmaps using AND
  473.     Global Const SRCCOPY = &HCC0020     ' Copies source bitmap to destination bitmap
  474.     Global Const SRCERASE = &H440328    ' Inverts destination bitmap and combines result with source using AND
  475.     Global Const SRCINVERT = &H660046   ' Combines pixels of dest and src bitmaps using XOR
  476.     Global Const SRCPAINT = &HEE0086    ' Combines pixels of dest and src bitmaps using OR
  477.     Global Const WHITENESS = &HFF0062   ' CLS white
  478.  
  479.