Public Const DBFilter = "Database Files (*.MDB)|*.mdb"
Public Const AllFilter = "All Files (*.*)|*.*"
Public Const ExeFilter = "Executable Files (*.EXE)|*.exe"
Public Win95RegBase As String
#If Win32 Then
'SCWL Functions
'Under Construction
Declare Function KeyStat Lib "scwl32.dll" (ByVal KeyToCheck As Integer) As Integer
Global Const KeyStatErr = -10 'could not map keyboard
Global Const KeyStatIsOn = 2 'key is currently on
Global Const KeyStatIsOff = 1 'Key is currently Off
Global Const KeyStatNumLock = 90
Global Const KeyStatCapsLock = 14
Global Const KeyStatScrollLock = 91
Declare Function Battery Lib "scwl32.dll" (ByVal BatteryType As Long) As Long
'Battery Type Consts
Public Const BatteryPowerStatus = 1
Public Const BatteryChargeStatus = 2
Public Const BatteryLifePercent = 3
Public Const BatteryLifeTime = 4
Public Const BatteryFullLifeTime = 5
'Result Type Consts
Public Const BatteryNoInformation = -1
Public Const BatteryInvalidBatteryType = -2
Public Const BatteryErrorInDLL = -3
Declare Function AscWP Lib "scwl32.dll" (ByVal Str As String, Pos As Integer) As Long
'End Under Construction
Declare Function LoggedOn Lib "scwl32.dll" (ByRef Name As String) As Integer
Declare Function SCFont Lib "scwl32.dll" (ByRef ThisFont As SCFontStruct) As Integer
Declare Function ProperString Lib "scwl32.dll" (ByRef S As String) As Integer
Declare Function GetDirStruct Lib "scwl32.dll" (ByVal Dir As Integer, ListBoxHandle As Integer) As Integer
Declare Function Soundalike Lib "scwl32.dll" Alias "SoundAlikeA" (ByVal S1 As String, ByVal S2 As String) As Boolean
Declare Function PentiumBug Lib "scwl32.dll" Alias "PentiumBugA" () As Boolean
'Return Comm Ports Available
'Declare Function CommPorts Lib "scwl32.dll" () As Integer 'not available 32 Bit (Yet)
'CommPorts will be combination of following
'Comm 1 = 1
'Comm 2 = 2
'Comm 3 = 4
'Comm 4 = 8
'No comm Ports = 0
'GetHiB & GetLoB Gets The hi and lo bytes from a word
'Word 0 .. 65535 Unsigned 16-bit (Type of Long Integer)
Declare Function GetHiB Lib "scwl32.dll" Alias "GetHiBA" (ByVal GetFrom As Integer) As Byte
Declare Function GetLoB Lib "scwl32.dll" Alias "GetLoBA" (ByVal GetFrom As Integer) As Byte
'GetHiW & GetLoW Gets The hi and lo Words from an Integer
Declare Function GetHiW Lib "scwl32.dll" Alias "GetHiWA" (ByVal GetFrom As Long) As Integer
Declare Function GetLoW Lib "scwl32.dll" Alias "GetLoWA" (ByVal GetFrom As Long) As Integer
Declare Function CursorN Lib "scwl32.dll" Alias "CursorNA" () As Integer
Declare Function CursorH Lib "scwl32.dll" Alias "CursorHA" () As Integer
'No Longer Supported Declare Sub DispMsg Lib "scwl32.dll" Alias "DispMsgA" (ByVal Title As String, ByVal filename As String)
Declare Function ShowTips Lib "scwl32.dll" Alias "ShowTipsA" (ByVal Title As String, ByVal TipTitle As String, ByVal StringFile As String, ByVal ShowAtStart As Integer) As Integer
Declare Sub OpenCD Lib "scwl32.dll" Alias "OpenCDA" ()
Declare Function EditOption Lib "scwl32.dll" Alias "EditOptionA" () As Integer
Declare Function GetTime Lib "scwl32.dll" Alias "GetTimeA" (RtnTime As String) As Integer
Declare Function GetPath Lib "scwl32.dll" Alias "GetPathA" (rtnpath As String) As Integer
Declare Function ShowAbout Lib "scwl32.dll" Alias "showaboutA" (ByVal IcoFile As String, ByVal Title As String, ByVal Version As String) As Boolean
Declare Function ShowOpen Lib "scwl32.dll" Alias "FOpen" (ByVal Title As String, ByVal Filter As String, ByVal DefaultDir As String, ReturnFile As String) As Integer
Declare Function ShowSave Lib "scwl32.dll" Alias "FSave" (ByVal Title As String, ByVal Filter As String, ByVal DefaultDir As String, ReturnFile As String) As Integer
Declare Function GetSymbol Lib "scwl32.dll" Alias "GetSymbolA" () As Boolean
Declare Function GetColor Lib "scwl32.dll" Alias "GetColorA" () As Long
Declare Sub ShowDisk Lib "scwl32.dll" Alias "ShowDiskA" ()
Declare Function GetDate Lib "scwl32.dll" Alias "GetDateA" (ByRef rtndate As String) As Integer
'No Longer Supported Declare Function GetDateI Lib "scwl32.dll" Alias "GetDateIA" () As Long
Declare Function GetHwnd Lib "scwl32.dll" Alias "GetHwndA" (ByVal MHwnd As Integer, ByVal WindowTitle As String) As Integer
Declare Function MemTotal Lib "scwl32.dll" Alias "MemTotalA" () As Long
Declare Function MemFree Lib "scwl32.dll" Alias "MemFreeA" () As Long
Declare Sub WrapCursor Lib "scwl32.dll" Alias "WrapCursorA" ()
Declare Function Percent Lib "scwl32.dll" Alias "PercentA" (ByVal Num As Double, ByVal Total As Double) As Integer
Declare Sub Today Lib "scwl32.dll" Alias "TodayA" (RtnDay As String)
Declare Function ChangeTitle Lib "scwl32.dll" Alias "ChangeTitleA" (ByVal MHwnd As Integer, ByVal ExistTitle As String, ByVal newtitle As String) As Integer
Declare Function ActiveTitle Lib "scwl32.dll" Alias "ActiveTitleA" (returntitle As String) As Integer
Declare Sub SetActiveTitle Lib "scwl32.dll" Alias "SetActiveTitleA" (ByVal returntitle As String)
Declare Sub CloseWindows Lib "scwl32.dll" Alias "ExitWinA" (ByVal ExitStyle As Integer)
Declare Function Logon Lib "scwl32.dll" Alias "LogonA" (ByVal Title As String, ByRef RtnValue As String) As Integer
Declare Function getini Lib "scwl32.dll" Alias "GetIniA" (ByVal Section As String, ByVal key As String, ByVal IniFile As String, default As String) As Integer
Declare Function writeini Lib "scwl32.dll" Alias "WriteIniA" (ByVal Section As String, ByVal key As String, ByVal Setting As String, ByVal IniFile As String) As Integer
Declare Sub OnTop Lib "scwl32.dll" Alias "OnTopA" (ByVal Hwnd As Long)
Declare Sub NotTop Lib "scwl32.dll" Alias "NotTopA" (ByVal Hwnd As Integer)
Declare Function Fileexist Lib "scwl32.dll" Alias "FileExistA" (ByVal filename As String) As Integer
Declare Function ShowHelp Lib "scwl32.dll" Alias "ShowHelpA" (ByVal MHwnd As Integer, ByVal TheHelpFile As String, ByVal TopicNo As Long) As Boolean
Declare Function Showsearch Lib "scwl32.dll" Alias "ShowSearchA" (ByVal MHwnd As Integer, ByVal TheHelpFile As String) As Boolean
Declare Function HDFree Lib "scwl32.dll" Alias "HDFreeA" (ByVal DiskNum As Integer) As Long
Declare Function HDUsed Lib "scwl32.dll" Alias "HDUsedA" (ByVal DiskNum As Integer) As Long
Declare Function HDTotal Lib "scwl32.dll" Alias "HDTotalA" (ByVal DiskNum As Integer) As Long
Declare Function CLBFind Lib "scwl32.dll" Alias "CLBFindA" (ByVal CL As Integer, ByVal Handle As Long, ByVal TextSearch As String) As Integer
'Windows Functions
Declare Function GetActiveWindow Lib "user32" () As Integer
Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal Hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Declare Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpString As Any, lpFileName As String) As Long
Declare Function WindowFromPoint Lib "user32" (ByVal xPoint As Long, ByVal yPoint As Long) As Long
Declare Function ShowWindow Lib "user32" (ByVal Hwnd As Long, ByVal nCmdShow As Long) As Long
Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String) As Long
Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
Declare Function GetSystemDirectory Lib "kernel32" Alias "GetSystemDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
Declare Function sndPlaySound Lib "WINMM.DLL" Alias "sndPlaySoundA" (ByVal lpszSoundName As Any, ByVal uFlags As Long) As Long
Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop 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 GetDesktopWindow Lib "user32" () As Long
Declare Function WaitForSingleObject Lib "kernel32" (ByVal hHandle As Long, ByVal dwMilliseconds As Long) As Long
Private Declare Function CreateProcessA Lib "kernel32" (ByVal lpApplicationName As Long, ByVal lpCommandLine As String, ByVal lpProcessAttributes As Long, ByVal lpThreadAttributes As Long, ByVal bInheritHandles As Long, ByVal dwCreationFlags As Long, ByVal lpEnvironment As Long, ByVal lpCurrentDirectory As Long, lpStartupInfo As STARTUPINFO, lpProcessInformation As PROCESS_INFORMATION) As Long
Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
Private Const NORMAL_PRIORITY_CLASS = &H20&
Private Const INFINITE = -1&
Declare Function StretchBlt Lib "gdi32" (ByVal hdc As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal nSrcWidth As Long, ByVal nSrcHeight As Long, ByVal dwRop As Long) As Long
Declare Function GetShortPathName Lib "kernel32" Alias "GetShortPathNameA" (ByVal lpszLongPath As String, ByVal lpszShortPath As String, ByVal cchBuffer As Long) As Long
Type POINTAPI ' Stores location of cursor
X As Long
Y As Long
End Type
Public Const CB_FINDSTRING = &H14C
Public Const LB_FINDSTRING = &H18F
#Else
Declare Function ProperString Lib "scwl.dll" (ByRef S As String) As Integer
Declare Function GetDirStruct Lib "scwl.dll" (ByVal Dir As Integer, ListBoxHandle As Integer) As Integer
Declare Function Soundalike Lib "scwl.dll" (ByVal S1 As String, ByVal S2 As String) As Boolean
Declare Function IsShareLoaded Lib "scwl.dll" () As Boolean
Declare Function PentiumBug Lib "scwl.dll" () As Boolean
'Return Comm Ports Available
Declare Function CommPorts Lib "scwl.dll" () As Integer
'CommPorts will be combination of following
'Comm 1 = 1
'Comm 2 = 2
'Comm 3 = 4
'Comm 4 = 8
'No comm Ports = 0
'GetHiB & GetLoB Gets The hi and lo bytes from a word
'Word 0 .. 65535 Unsigned 16-bit (Type of Long Integer)
Declare Function GetHiB Lib "scwl.dll" (ByVal GetFrom As Integer) As Byte
Declare Function GetLoB Lib "scwl.dll" (ByVal GetFrom As Integer) As Byte
'GetHiW & GetLoW Gets The hi and lo Words from an Integer
Declare Function GetHiW Lib "scwl.dll" (ByVal GetFrom As Long) As Integer
Declare Function GetLoW Lib "scwl.dll" (ByVal GetFrom As Long) As Integer
Declare Function CursorN Lib "scwl.dll" () As Integer
Declare Function CursorH Lib "scwl.dll" () As Integer
Declare Sub DispMsg Lib "scwl.dll" (ByVal Title As String, ByVal filename As String)
Declare Function ShowTips Lib "scwl.dll" Alias "Showtips" (ByVal Title As String, ByVal TipTitle As String, ByVal StringFile As String, ByVal ShowAtStart As Integer) As Integer
Declare Sub OpenCD Lib "scwl.dll" ()
Declare Function EditOption Lib "scwl.dll" () As Integer
Declare Function GetTime Lib "scwl.dll" (RtnTime As String) As Integer
Declare Function GetPath Lib "scwl.dll" (rtnpath As String) As Integer
Declare Function ShowAbout Lib "scwl.dll" (ByVal IcoFile As String, ByVal Title As String, ByVal Version As String) As Boolean
Declare Function ShowOpen Lib "scwl.dll" (ByVal Title As String, ByVal Filter As String, ByVal DefaultDir As String, ReturnFile As String) As Integer
Declare Function ShowSave Lib "scwl.dll" (ByVal Title As String, ByVal Filter As String, ByVal DefaultDir As String, ReturnFile As String) As Integer
Declare Sub ShowTip Lib "scwl.dll" (ByVal tiptext As String)
Declare Function GetSymbol Lib "scwl.dll" () As Boolean
Declare Function GetColor Lib "scwl.dll" () As Long
Declare Sub ShowStart Lib "scwl.dll" (ByVal PictureFile As String)
Declare Sub ClearStart Lib "scwl.dll" ()
Declare Sub ShowRes Lib "scwl.dll" ()
Declare Sub ShowDisk Lib "scwl.dll" ()
Declare Function GetDate Lib "scwl.dll" (ByRef rtndate As String) As Integer
Declare Function GetDateI Lib "scwl.dll" () As Long
Declare Function GetHwnd Lib "scwl.dll" (ByVal MHwnd As Integer, ByVal WindowTitle As String) As Integer
Declare Function MemTotal Lib "scwl.dll" () As Long
Declare Function MemFree Lib "scwl.dll" () As Long
Declare Sub WrapCursor Lib "scwl.dll" ()
Declare Function Percent Lib "scwl.dll" (ByVal Num As Double, ByVal Total As Double) As Integer
Declare Sub Today Lib "scwl.dll" (RtnDay As String)
Declare Function ChangeTitle Lib "scwl.dll" Alias "changetitle" (ByVal MHwnd As Integer, ByVal ExistTitle As String, ByVal newtitle As String) As Integer
Declare Function ActiveTitle Lib "scwl.dll" (returntitle As String) As Integer
Declare Sub SetActiveTitle Lib "scwl.dll" (ByVal returntitle As String)
Declare Sub CloseWindows Lib "scwl.dll" Alias "ExitWin" (ByVal ExitStyle As Integer)
Declare Function Logon Lib "scwl.dll" (ByVal Title As String, RtnValue As String) As Integer
Declare Function getini Lib "scwl.dll" (ByVal Section As String, ByVal key As String, ByVal IniFile As String, default As String) As Integer
Declare Function writeini Lib "scwl.dll" (ByVal Section As String, ByVal key As String, ByVal Setting As String, ByVal IniFile As String) As Integer
Declare Sub OnTop Lib "scwl.dll" (ByVal Hwnd As Integer)
Declare Sub NotTop Lib "scwl.dll" (ByVal Hwnd As Integer)
Declare Function Fileexist Lib "scwl.dll" (ByVal filename As String) As Integer
Declare Function ShowHelp Lib "scwl.dll" (ByVal MHwnd As Integer, ByVal TheHelpFile As String, ByVal TopicNo As Long) As Boolean
Declare Function Showsearch Lib "scwl.dll" (ByVal MHwnd As Integer, ByVal TheHelpFile As String) As Boolean
Declare Function GetRes Lib "scwl.dll" (ByVal restype As Integer) As Integer
Declare Function HDFree Lib "scwl.dll" (ByVal DiskNum As Integer) As Long
Declare Function HDUsed Lib "scwl.dll" (ByVal DiskNum As Integer) As Long
Declare Function HDTotal Lib "scwl.dll" (ByVal DiskNum As Integer) As Long
Declare Function CLBFind Lib "scwl.dll" (ByVal CL As Integer, ByVal Handle As Integer, ByVal TextSearch As String) As Integer
Declare Function TotLines Lib "cdl36sc.dll" (ByVal MLEHwnd As Integer) As Long
Declare Sub TextPos Lib "cdl36sc.dll" (ByVal editwnd As Integer, LPPopint As POINTAPI)
Declare Sub DrawRulerX Lib "cdl36sc.dll" (ByVal picwnd As Integer)
Declare Sub DrawRulerXT Lib "cdl36sc.dll" (ByVal picwnd As Integer, ByVal LeftMargin As Double, ByVal RightMargin As Double, ByVal RulerWidth As Double, ByVal FromNumber As Integer, ByVal ToNumber As Integer)
Declare Sub TabStop Lib "cdl36sc.dll" (ByVal picwnd As Integer, ByVal Position As Integer, ByVal TabChar As Integer)
Declare Sub Paintpic Lib "cdl36sc.dll" (ByVal DHDC As Integer)
Declare Function ScrollPos Lib "cdl36sc.dll" (ByVal SCrollHwnd As Integer) As Integer
Declare Function GetWindowsDirectory Lib "Kernel" Alias "getwindowsdirectory" (ByVal p$, ByVal S%) As Integer
Declare Function GetSystemDirectory Lib "Kernel" (ByVal p$, ByVal S%) As Integer
Declare Function GetVersion Lib "Kernel" () As Long
Declare Function sndPlaySound Lib "MMSYSTEM" (ByVal lpszSoundName As String, ByVal uFlags As Integer) As Integer
Declare Function GetModuleUsage Lib "Kernel" (ByVal hModule As Integer) As Integer
Declare Sub Yield Lib "Kernel" ()
Declare Function GetPrivateProfileString Lib "Kernel" (ByVal AppName$, ByVal KeyName$, ByVal keydefault$, ByVal ReturnString$, ByVal NumBytes As Integer, ByVal filename$) As Integer
Declare Function WritePrivateProfileString Lib "Kernel" (ByVal AppName$, ByVal KeyName$, ByVal keydefault$, ByVal filename$) As Integer
Declare Function ShowWindow% Lib "User" (ByVal Handle As Integer, ByVal Cmd As Integer)
'Declare Sub GetCursorPos Lib "User" (lpPoint As POINTAPI)
Declare Function GetActiveWindow Lib "User" () As Integer
Declare Function WindowFromPoint Lib "User" (ByVal lpPointY As Integer, ByVal lpPointX As Integer) As Integer
'Declare Function ShowWindow Lib "User" (ByVal hWnd As Integer, ByVal nCmdShow As Integer) As Integer
Public Declare Sub GetCursorPos Lib "User" (lpPoint As POINTAPI)
Declare Function SendMessage Lib "User" (ByVal Hwnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, ByVal lParam As Any) As Long