Private Sub Form_Unload(Cancel As Integer) Unlockform End Sub
三、建立一个模块,复制下面代码 Option Explicit Private 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 Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long Private Type PointAPI X As Long Y As Long End Type Private Type MINMAXINFO ptReserved As PointAPI ptMaxSize As PointAPI ptMaxPosition As PointAPI ptMinTrackSize As PointAPI ptMaxTrackSize As PointAPI End Type Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (pDest As Any, pSource As Any, ByVal ByteLen As Long)