CodePudding user response:
'This project needs one form
'Also set StartupObject to Sub Main'
'(- & gt; Project Properties - & gt; The General Tab - & gt; Startup Object)
'-- Declarations
Declare the Function RegisterClass Lib "user32" Alias "RegisterClassA" (Class As WNDCLASS) As Long
Declare the Function UnregisterClass Lib "user32" Alias "UnregisterClassA" (ByVal lpClassName As String, ByVal hInstance) As Long As Long
Declare the Function CreateWindowEx Lib "user32" Alias "CreateWindowExA" (ByVal dwExStyle As Long, ByVal lpClassName As String, ByVal lpWindowName As String, ByVal dwStyle As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hWndParent As Long, ByVal hMenu As Long, ByVal hInstance As Long, lpParam As Any) As Long
Declare the Function DefWindowProc Lib "user32" Alias "DefWindowProcA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam) As Long As Long
Declare Sub PostQuitMessage Lib "user32" (ByVal nExitCode As Long)
Declare the Function GetMessage Lib "user32" Alias "GetMessageA" (lpMsg As Msg, ByVal hWnd As Long, ByVal wMsgFilterMin As Long, ByVal wMsgFilterMax As Long) As Long
Declare the Function TranslateMessage Lib "user32" (lpMsg As Msg) As Long
Declare the Function DispatchMessage Lib "user32" Alias "DispatchMessageA" (lpMsg As Msg) As Long
Declare the Function ShowWindow Lib "user32" (ByVal hWnd As Long, ByVal nCmdShow As Long) As Long
Declare the Function LoadCursor Lib "user32" Alias "LoadCursorA" (ByVal hInstance As Long, ByVal lpCursorName As Any) As Long
Declare the Function DefMDIChildProc Lib "user32" Alias "DefMDIChildProcA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam) As Long As Long
'Define information of the window (pointed to by hWnd)
Declare the Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long) As Long
Declare the Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Declare the 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
Type WNDCLASS
Style As Long
Lpfnwndproc As Long
CbClsextra As Long
CbWndExtra2 As Long
HInstance As Long
HIcon As Long
HCursor As Long
HbrBackground As Long
LpszMenuName As String
LpszClassName As String
End Type
Type POINTAPI
X As Long
Y As Long
End Type
The Type of Msg
HWnd As Long
The message As Long
WParam As Long
LParam As Long
Time As Long
Pt As POINTAPI
End Type
'Class styles
Public Const CS_VREDRAW=& amp; H1
Public Const CS_HREDRAW=& amp; The H2
Public Const CS_KEYCVTWINDOW=& amp; H4
Public Const CS_DBLCLKS=& amp; H8
Public Const CS_OWNDC=& amp; H20
Public Const CS_CLASSDC=& amp; H40
Public Const CS_PARENTDC=& amp; H80
Public Const CS_NOKEYCVT=& amp; H100
Public Const CS_NOCLOSE=& amp; H200
Public Const CS_SAVEBITS=& amp; H800
Public Const CS_BYTEALIGNCLIENT=& amp; H1000
Public Const CS_BYTEALIGNWINDOW=& amp; H2000
Public Const CS_PUBLICCLASS=& amp; H4000
'the Window styles
Public Const WS_OVERLAPPED=& amp; H0 & amp;
Public Const WS_POPUP=& amp; H80000000
Public Const WS_CHILD=& amp; H40000000
Public Const WS_MINIMIZE=& amp; H20000000
Public Const WS_VISIBLE=& amp; H10000000
Public Const WS_DISABLED=& amp; H8000000
Public Const WS_CLIPSIBLINGS=& amp; H4000000
Public Const WS_CLIPCHILDREN=& amp; H2000000
Public Const WS_MAXIMIZE=& amp; H1000000
Public Const WS_CAPTION=& amp; HC00000 'WS_BORDER Or WS_DLGFRAME
Public Const WS_BORDER=& amp; H800000
Public Const WS_DLGFRAME=& amp; H400000
Public Const WS_VSCROLL=& amp; H200000
Public Const WS_HSCROLL=& amp; H100000
Public Const WS_SYSMENU=& amp; H80000
Public Const WS_THICKFRAME=& amp; H40000
Public Const WS_GROUP=& amp; H20000
Public Const WS_TABSTOP=& amp; H10000
Public Const WS_MINIMIZEBOX=& amp; H20000
Public Const WS_MAXIMIZEBOX=& amp; H10000
Public Const WS_TILED=WS_OVERLAPPED
Public Const WS_ICONIC=WS_MINIMIZE
Public Const WS_SIZEBOX=WS_THICKFRAME
Public Const WS_OVERLAPPEDWINDOW=(WS_OVERLAPPED Or WS_CAPTION Or WS_SYSMENU Or WS_THICKFRAME Or WS_MINIMIZEBOX Or WS_MAXIMIZEBOX)
Public Const WS_TILEDWINDOW=WS_OVERLAPPEDWINDOW
Public Const WS_POPUPWINDOW=(WS_POPUP Or WS_BORDER Or WS_SYSMENU)
Public Const WS_CHILDWINDOW=(WS_CHILD)
'ExWindowStyles
Public Const WS_EX_DLGMODALFRAME=& amp; H1 & amp;
Public Const WS_EX_NOPARENTNOTIFY=& amp; H4 & amp;
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull