vbAccelerator - Contents of code file: Globals.bas

Attribute VB_Name = "Globals"
Option Private Module
Option Explicit

Type AlignWidths
    LeftWidth      As Long
    TopHeight      As Long
    RightWidth     As Long
    BottomHeight   As Long
End Type

Type RECT
    Left As Long
    Top As Long
    Right As Long
    Bottom As Long
End Type

Type POINTAPI
    X As Long
    Y As Long
End Type

Type Size
 cx As Long
 cy As Long
End Type


Type MINMAXINFO
 ptReserved As POINTAPI
 ptMaxSize As POINTAPI
 ptMaxPosition As POINTAPI
 ptMinTrackSize As POINTAPI
 ptMaxTrackSize As POINTAPI
End Type

Type msg
 hwnd As Long
 message As Long
 wParam As Long
 lParam As Long
 Time As Long
 pt As POINTAPI
End Type

Public Const ERROR_INSUFFICIENT_BUFFER = 122
Public Const eeErrorBase = 26720

Public Type FILETIME
   dwLowDateTime As Long
   dwHighDateTime As Long
End Type

Public Type INTERNET_CACHE_ENTRY_INFO
   dwStructSize As Long
   lpszSourceUrlName As String
   lpszLocalFileName As String
   CacheEntryType As String
   dwUseCount As Long
   dwHitRate As Long
   dwSizeLow As Long
   dwSizeHigh As Long
   LastModifiedTime As FILETIME
   ExpireTIme As FILETIME
   LastAccessTime As FILETIME
   LastSyncTime As FILETIME
   lpHeaderInfo As Long
   dwHeaderInfoSize As Long
   lpszFileExtension As String
   dwReserved As Long
End Type

Public Declare Function GetUrlCacheEntryInfo Lib "wininet.dll" Alias
 "GetUrlCacheEntryInfoA" _
   (ByVal sUrlName As String, _
   lpCacheEntryInfo As Any, _
   lpdwCacheEntryInfoBufferSize As Long _
   ) As Long

' To Report API errors:
Public Const FORMAT_MESSAGE_ALLOCATE_BUFFER = &H100
Public Const FORMAT_MESSAGE_ARGUMENT_ARRAY = &H2000
Public Const FORMAT_MESSAGE_FROM_HMODULE = &H800
Public Const FORMAT_MESSAGE_FROM_STRING = &H400
Public Const FORMAT_MESSAGE_FROM_SYSTEM = &H1000
Public Const FORMAT_MESSAGE_IGNORE_INSERTS = &H200
Public Const FORMAT_MESSAGE_MAX_WIDTH_MASK = &HFF
Public Declare Function FormatMessage Lib "kernel32" Alias "FormatMessageA" _
   (ByVal dwFlags As Long, lpSource As Any, ByVal dwMessageId As Long, _
   ByVal dwLanguageId As Long, ByVal lpBuffer As String, ByVal nSize As Long,
    Arguments As Long _
   ) As Long
   
Public Const SW_ERASE = &H4
Public Const SW_INVALIDATE = &H2
Public Const SW_SCROLLCHILDREN = &H1


Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd
 As Long, ByVal lpString As String, ByVal cch As Long) As Long
Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hwnd As
 Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long
Declare Function InternetAttemptConnect Lib "wininet" (dwReserved As Long) As
 Long
Declare Function InternetCheckConnection Lib "wininet" Alias
 "InternetCheckConnectionA" (ByVal lpszUrl As String, ByVal dwFlags As Long,
 ByVal dwReserved As Long) As Long
Declare Function IsChild Lib "user32" (ByVal hWndParent As Long, ByVal hwnd As
 Long) As Long

Declare Function ScrollWindowEx Lib "user32" (ByVal hwnd As Long, ByVal dx As
 Long, ByVal dy As Long, lprcScroll As RECT, lprcClip As RECT, ByVal hrgnUpdate
 As Long, lprcUpdate As RECT, ByVal fuScroll As Long) As Long
Declare Function GetActiveWindow Lib "user32" () As Long


Declare Function GetForegroundWindow Lib "user32" () As Long
Declare Function SetForegroundWindow Lib "user32" (ByVal hwnd As Long) As Long
Declare Function DrawEdge Lib "user32" (ByVal hDC As Long, qrc As RECT, ByVal
 edge As Long, ByVal grfFlags As Long) As Long

Declare Function GetSysColor Lib "user32" (ByVal nIndex As Long) As Long
Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As Long
Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
Declare Function ReleaseDC Lib "user32" (ByVal hwnd As Long, ByVal hDC As Long)
 As Long
Declare Function SetCapture Lib "user32" (ByVal hwnd As Long) As Long
Declare Function ReleaseCapture Lib "user32" () As Long

Declare Function IsCharAlpha Lib "user32" Alias "IsCharAlphaA" (ByVal cChar As
 Byte) As Long
Declare Function IsCharAlphaNumeric Lib "user32" Alias "IsCharAlphaNumericA"
 (ByVal cChar As Byte) As Long
Declare Function IsWindowEnabled Lib "user32" (ByVal hwnd As Long) As Long

Declare Function ScrollWindow Lib "user32" (ByVal hwnd As Long, ByVal XAmount
 As Long, ByVal YAmount As Long, lpRect As RECT, lpClipRect As RECT) As Long
Declare Function GetTextExtentPoint32 Lib "gdi32" Alias "GetTextExtentPoint32A"
 (ByVal hDC As Long, ByVal lpsz As String, ByVal cbString As Long, lpSize As
 Size) As Long
Declare Function FillRect Lib "user32" (ByVal hDC As Long, lpRect As RECT,
 ByVal hBrush As Long) As Long
Declare Function Rectangle Lib "gdi32" (ByVal hDC As Long, ByVal X1 As Long,
 ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long

Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Declare Function GetCaretPos Lib "user32" (lpPoint As POINTAPI) As Long
Declare Function ShowCaret Lib "user32" (ByVal hwnd As Long) As Long
Declare Function HideCaret Lib "user32" (ByVal hwnd As Long) As Long
Declare Function SetCaretPos Lib "user32" (ByVal X As Long, ByVal Y As Long) As
 Long
Declare Function CreateCaret Lib "user32" (ByVal hwnd As Long, ByVal hBitmap As
 Long, ByVal nWidth As Long, ByVal nHeight As Long) As Long
Declare Function DestroyCaret Lib "user32" () As Long

'For Trapping Tab Key on Dialog Box
Declare Function CallNextHookEx Lib "user32" (ByVal hHook As Long, ByVal nCode
 As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Declare Function UnhookWindowsHookEx Lib "user32" (ByVal hHook As Long) As Long
Declare Function SetWindowsHookEx Lib "user32" Alias "SetWindowsHookExA" (ByVal
 idHook As Long, ByVal lpfn As Long, ByVal hmod As Long, ByVal dwThreadId As
 Long) As Long
Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As
 Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long

Declare Function GetParent Lib "user32" (ByVal hwnd As Long) As Long
Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal
 hWndNewParent As Long) As Long
Declare Function GetClientRect Lib "user32" (ByVal hwnd As Long, lpRect As
 RECT) As Long
Declare Function GetWindowRect Lib "user32" (ByVal hwnd As Long, lpRect As
 RECT) As Long
Declare Function ClientToScreen Lib "user32" (ByVal hwnd As Long, lpPoint As
 POINTAPI) As Long

Declare Function EnableWindow Lib "user32" (ByVal hwnd As Long, ByVal fEnable
 As Long) As Long
Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal
 hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long,
 ByVal cy As Long, ByVal wFlags As Long) As Long
Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Integer
Declare Function GetFocus Lib "user32" () As Long
Declare Function SetFocus Lib "user32" (ByVal hwnd As Long) As Long
Declare Function GetDlgItem Lib "user32" (ByVal hDlg As Long, ByVal nIDDlgItem
 As Long) As Long
Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As
 Long, ByVal wMsg As Long, ByVal wParam As Integer, ByVal lParam As Any) As Long

Declare Function SetDlgItemText& Lib "user32" Alias "SetDlgItemTextA" (ByVal
 hDlg As Long, ByVal nIDDlgItem As Long, ByVal lpString As String)
Declare Function GetDlgItemText& Lib "user32" Alias "GetDlgItemTextA" (ByVal
 hDlg As Long, ByVal nIDDlgItem As Long, ByVal lpString As String, ByVal
 nMaxCount As Long)
Declare Function SetDlgItemInt& Lib "user32" (ByVal hDlg As Long, ByVal
 nIDDlgItem As Long, ByVal wValue As Long, ByVal bSigned As Long)

Declare Function DrawText Lib "user32" Alias "DrawTextA" (ByVal hDC As Long,
 ByVal lpStr As String, ByVal nCount As Long, lpRect As RECT, ByVal wFormat As
 Long) As Long
Declare Function DrawFocusRect Lib "user32" (ByVal hDC As Long, lpRect As RECT)
 As Long

Declare Function SendMessageArray Lib "user32" Alias "SendMessageA" (ByVal hwnd
 As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Declare Function SendMessageStr Lib "user32" Alias "SendMessageA" (ByVal hwnd
 As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As String) As
 Long
Declare Function GetClipBox Lib "gdi32" (ByVal hDC As Long, lpRect As RECT) As
 Long

Declare Function CallWindowProc Lib "user32" Alias "CallWindowProcA" (ByVal
 lpPrevWndFunc As Long, ByVal hwnd As Long, ByVal msg As Long, ByVal wParam As
 Long, ByVal lParam As Long) As Long
Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd
 As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd
 As Long, ByVal nIndex As Long) As Long

Declare Function SendMessageLong Lib "user32" Alias "SendMessageA" (ByVal hwnd
 As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As
 Long
Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1
 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As
 Long
Declare Function GetNextWindow Lib "user32" Alias "GetWindow" (ByVal hwnd As
 Long, ByVal wFlag As Long) As Long

Declare Function GetDCEx Lib "user32" (ByVal hwnd As Long, ByVal hrgnclip As
 Long, ByVal fdwOptions As Long) As Long
Declare Function ScreenToClient Lib "user32" (ByVal hwnd As Long, lpPoint As
 POINTAPI) As Long
Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As
 Long) As Long
Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (pDest As Any, pSrc
 As Any, ByVal ByteLen As Long)
Declare Function MoveWindow Lib "user32" (ByVal hwnd As Long, ByVal X As Long,
 ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal bRepaint
 As Long) As Long
Declare Sub ClipCursor Lib "user32" (lpRect As Any)
Declare Sub OffsetRect Lib "user32" (lpRect As RECT, ByVal X As Long, ByVal Y
 As Long)


Public Const Vb_One = 1

'Dialog Internal Controls
Public Const fdlgChxReadOnly = &H410
Public Const fdlgcmbSaveAsType = &H470
Public Const fdlgCmbSaveInFindIn = &H471
Public Const fdlgEdtFileName = &H480
Public Const fdlgIDCANCEL = 2
Public Const fdlgIDOK = 1
Public Const fdlgLBLstFiles = &H460
Public Const fdlgLVLstFiles = &H461
Public Const fdlgPshHelp = &H40E
Public Const fdlgStcFileName = &H442
Public Const fdlgStcSaveAsType = &H441
Public Const fdlgStcSaveInFindIn = &H443

Public Const BDR_RAISEDOUTER = &H1
Public Const BDR_SUNKENOUTER = &H2
Public Const BDR_RAISEDINNER = &H4
Public Const BDR_SUNKENINNER = &H8

Public Const BDR_OUTER = &H3
Public Const BDR_INNER = &HC
Public Const BDR_RAISED = &H5
Public Const BDR_SUNKEN = &HA

Public Const EDGE_RAISED = (BDR_RAISEDOUTER Or BDR_RAISEDINNER)
Public Const EDGE_SUNKEN = (BDR_SUNKENOUTER Or BDR_SUNKENINNER)
Public Const EDGE_ETCHED = (BDR_SUNKENOUTER Or BDR_RAISEDINNER)
Public Const EDGE_BUMP = (BDR_RAISEDOUTER Or BDR_SUNKENINNER)
 
Public Const BF_LEFT = &H1
Public Const BF_TOP = &H2
Public Const BF_RIGHT = &H4
Public Const BF_BOTTOM = &H8

Public Const BF_TOPLEFT = (BF_TOP Or BF_LEFT)
Public Const BF_TOPRIGHT = (BF_TOP Or BF_RIGHT)
Public Const BF_BOTTOMLEFT = (BF_BOTTOM Or BF_LEFT)
Public Const BF_BOTTOMRIGHT = (BF_BOTTOM Or BF_RIGHT)
Public Const BF_RECT = (BF_LEFT Or BF_TOP Or BF_RIGHT Or BF_BOTTOM)
Public Const BF_DIAGONAL = &H10

' For diagonal lines, the BF_RECT flags specify the end point of the
' vector bounded by the rectangle parameter.
Public Const BF_DIAGONAL_ENDTOPRIGHT = (BF_DIAGONAL Or BF_TOP Or BF_RIGHT)
Public Const BF_DIAGONAL_ENDTOPLEFT = (BF_DIAGONAL Or BF_TOP Or BF_LEFT)
Public Const BF_DIAGONAL_ENDBOTTOMLEFT = (BF_DIAGONAL Or BF_BOTTOM Or BF_LEFT)
Public Const BF_DIAGONAL_ENDBOTTOMRIGHT = (BF_DIAGONAL Or BF_BOTTOM Or BF_RIGHT)

Public Const BF_MIDDLE = &H800   ' Fill in the middle
Public Const BF_SOFT = &H1000    ' For softer buttons
Public Const BF_ADJUST = &H2000  ' Calculate the space left over
Public Const BF_FLAT = &H4000    ' For flat rather than 3D borders
Public Const BF_MONO = &H8000    ' For monochrome borders

Public Const DCX_CACHE = &H2&
Public Const DCX_CLIPCHILDREN = &H8&
Public Const DCX_CLIPSIBLINGS = &H10&
Public Const DCX_EXCLUDERGN = &H40&
Public Const DCX_EXCLUDEUPDATE = &H100&
Public Const DCX_INTERSECTRGN = &H80&
Public Const DCX_INTERSECTUPDATE = &H200&
Public Const DCX_LOCKWINDOWUPDATE = &H400&
Public Const DCX_NORECOMPUTE = &H100000
Public Const DCX_NORESETATTRS = &H4&
Public Const DCX_PARENTCLIP = &H20&
Public Const DCX_VALIDATE = &H200000
Public Const DCX_WINDOW = &H1&

Public Const COLOR_ACTIVECAPTION = 2
Public Const COLOR_CAPTIONTEXT = 9
Public Const COLOR_WINDOWFRAME = 6

Public Const SM_CYCAPTION = 4
Public Const SM_CXDLGFRAME = 7
Public Const SM_CYDLGFRAME = 8

Public Const GW_HWNDFIRST = 0
Public Const GW_HWNDLAST = 1
Public Const GW_HWNDNEXT = 2
Public Const GW_HWNDPREV = 3
Public Const GW_OWNER = 4
Public Const GW_MAX = 5
Public Const GW_CHILD = 5

Public Const VK_TAB = &H9
Public Const VK_SHIFT = &H10
Public Const VK_CONTROL = &H11
Public Const SPI_GETWORKAREA& = 48
Public Const WH_KEYBOARD = 2
Public Const WH_MOUSE = 7

Public Const WM_MDICASCADE = &H227

Public Const WM_MDINEXT = &H224
Public Const WM_COMMAND = &H111
Public Const WM_ENABLE = &HA
Public Const WM_SETCURSOR = &H20
Public Const WM_SETREDRAW = &HB
Public Const WM_USER = &H400
Public Const WM_MOVE = &H3
Public Const WM_SHOWWINDOW = &H18
Public Const WM_SETFOCUS = &H7
Public Const WM_KILLFOCUS = &H8
Public Const WM_LBUTTONDOWN = &H201
Public Const WM_LBUTTONUP = &H202
Public Const WM_MOUSEACTIVATE = &H21
Public Const WM_MOUSEFIRST = &H200
Public Const WM_MOUSELAST = &H209
Public Const WM_MOUSEMOVE = &H200
Public Const WM_LBUTTONDBLCLK = &H203
Public Const WM_ACTIVATE = &H6
Public Const WM_SIZE = &H5
Public Const WM_SYSCOMMAND = &H112
Public Const WM_GETMINMAXINFO = &H24
Public Const WM_EXITSIZEMOVE = &H232
Public Const WM_NCHITTEST = &H84
Public Const WM_WINDOWPOSCHANGING = &H46
Public Const WM_PAINT = &HF
Public Const WM_NCPAINT = &H85
Public Const WM_NCACTIVATE = &H86
Public Const WM_GETDLGCODE = &H87
Public Const WM_NCMOUSEMOVE = &HA0
Public Const WM_NCLBUTTONDOWN = &HA1
Public Const WM_NCLBUTTONUP = &HA2
Public Const WM_NCLBUTTONDBLCLK = &HA3
Public Const WM_NCRBUTTONDOWN = &HA4
Public Const WM_NCRBUTTONUP = &HA5
Public Const WM_NCRBUTTONDBLCLK = &HA6
Public Const WM_NCMBUTTONDOWN = &HA7
Public Const WM_NCMBUTTONUP = &HA8
Public Const WM_NCMBUTTONDBLCLK = &HA9
Public Const WM_NOTIFY = &H4E
Public Const WM_RBUTTONDOWN = &H204
Public Const WM_RBUTTONUP = &H205
Public Const WM_MBUTTONDOWN = &H207
Public Const WM_MBUTTONUP = &H208
Public Const WM_CLOSE = &H10&
Public Const WM_MDIACTIVATE = &H222

Public Const SC_MOVE = &HF012
Public Const SW_HIDE = 0
Public Const SW_SHOWNORMAL = 1
Public Const SW_SHOW = 5

'Traps Alter Key
Public Const KBH_MASK = &H20000000


Public Const SWP_NOSIZE = &H1
Public Const SWP_NOMOVE = &H2
Public Const SWP_NOZORDER = &H4
Public Const SWP_NOREDRAW = &H8
Public Const SWP_NOACTIVATE = &H10
Public Const SWP_FRAMECHANGED = &H20
Public Const SWP_SHOWWINDOW = &H40
Public Const SWP_HIDEWINDOW = &H80
Public Const SWP_NOCOPYBITS = &H100
Public Const SWP_NOOWNERZORDER = &H200
Public Const SWP_DRAWFRAME = SWP_FRAMECHANGED
Public Const SWP_NOREPOSITION = SWP_NOOWNERZORDER
Public Const SWP_MOVEHIDE = SWP_NOSIZE Or SWP_HIDEWINDOW

Public Const HWND_TOPMOST = -1
Public Const HWND_NOTOPMOST = -2
Public Const TOPMOST_FLAGS = SWP_NOMOVE Or SWP_NOSIZE

Public Const OFN_ALLOWMULTISELECT = &H200
Public Const OFN_CREATEPROMPT = &H2000
Public Const OFN_ENABLEHOOK = &H20
Public Const OFN_ENABLETEMPLATE = &H40
Public Const OFN_ENABLETEMPLATEHANDLE = &H80
Public Const OFN_EXPLORER = &H80000
Public Const OFN_EXTENSIONDIFFERENT = &H400
Public Const OFN_FILEMUSTEXIST = &H1000
Public Const OFN_HIDEREADONLY = &H4
Public Const OFN_LONGNAMES = &H200000
Public Const OFN_NOCHANGEDIR = &H8
Public Const OFN_NODEREFERENCELINKS = &H100000
Public Const OFN_NOLONGNAMES = &H40000
Public Const OFN_NONETWORKBUTTON = &H20000
Public Const OFN_NOREADONLYRETURN = &H8000
Public Const OFN_NOTESTFILECREATE = &H10000
Public Const OFN_NOVALIDATE = &H100
Public Const OFN_OVERWRITEPROMPT = &H2
Public Const OFN_PATHMUSTEXIST = &H800
Public Const OFN_READONLY = &H1
Public Const OFN_SHAREAWARE = &H4000
Public Const OFN_SHAREFALLTHROUGH = 2
Public Const OFN_SHARENOWARN = 1
Public Const OFN_SHAREWARN = 0
Public Const OFN_SHOWHELP = &H10
Public Const OFS_MAXPATHNAME = 128


'//   Commands to pass WinHelp()
Public Const HELP_CONTEXT = &H1     '//  Display topic identified by number in
 Data
Public Const HELP_QUIT = &H2        '//  Terminate help
Public Const HELP_INDEX = &H3       '//  Display index
Public Const HELP_HELPONHELP = &H4  '//  Display help on using help
Public Const HELP_SETINDEX = &H5    '//  Set an alternate Index for help file
 with more than one index
Public Const HELP_KEY = &H101       '//  Display topic for keyword in Data
Public Const HELP_MULTIKEY = &H201  '//  Lookup keyword in alternate table and
 display topic

Public Const DT_WORDBREAK = &H10
Public Const DT_NOCLIP = &H100
Public Const DT_WORD_ELLIPSIS = &H40000
Public Const DT_PATH_ELLIPSIS = &H4000
Public Const DT_END_ELLIPSIS = &H8000
Public Const DT_SINGLELINE = &H20
Public Const DT_CENTER = &H1
Public Const DT_VCENTER = &H4
Public Const DT_RIGHT = &H2
Public Const DT_LEFT = &H0
Public Const DT_FLAGS = DT_SINGLELINE Or DT_LEFT Or DT_END_ELLIPSIS

Public Const LB_SETTABSTOPS = &H192
Public Const LB_FINDSTRING = &H18F
Public Const LB_FINDSTRINGEXACT = &H1A2
Public Const LB_INSERTSTRING = &H181
Public Const LB_RESETCONTENT = &H184
Public Const LB_GETCOUNT = &H18B
Public Const LB_DELETESTRING = &H182
Public Const LB_SETITEMDATA = &H19A
Public Const LB_SETCOUNT = &H1A7
Public Const LB_INITSTORAGE = &H1A8

Public Const WS_EX_TOPMOST = &H8
Public Const WS_EX_TRANSPARENT = &H20
Public Const WS_EX_TOOLWINDOW = &H80
Public Const WS_EX_WINDOWEDGE = &H100
Public Const WS_EX_CONTROLPARENT = &H10000
Public Const WS_EX_NOPARENTNOTIFY = &H4&
Public Const WS_DLGFRAME = &H400000
Public Const WS_BORDER = &H800000
Public Const WS_OVERLAPPED = &H0&
Public Const WS_CAPTION = &HC00000
Public Const WS_MAXIMIZEBOX = &H10000
Public Const WS_MINIMIZEBOX = &H20000
Public Const WS_SYSMENU = &H80000
Public Const WS_THICKFRAME = &H40000
Public Const WS_VISIBLE = &H10000000
Public Const WS_OVERLAPPEDWINDOW = (WS_OVERLAPPED Or WS_CAPTION Or WS_SYSMENU
 Or WS_THICKFRAME)
Public Const WS_OVERLAPPEDMAX = (WS_OVERLAPPED Or WS_CAPTION Or WS_SYSMENU Or
 WS_THICKFRAME Or WS_MINIMIZEBOX Or WS_MAXIMIZEBOX)
Public Const WS_CLIPCHILDREN = &H2000000
Public Const WS_CLIPSIBLINGS = &H4000000
Public Const WS_VSCROLL = &H200000
Public Const WS_EX_PALETTEWINDOW = (WS_EX_TOOLWINDOW Or WS_EX_TOPMOST)

Public Const GWL_HWNDPARENT = (-8)
Public Const GWL_WNDPROC = -4
Public Const GWL_STYLE = (-16)
Public Const GWL_EXSTYLE = (-20)