Description: VB is not allowed to exit the Windows source code, set up to allow exit and allowed to exit the two functions. Record Window Procedure of the address to begin the interception of messages and message handling process to wndproc Cancel message interception, ending the sub classification process. This function is receiving sub-categories intercepted message to the Public Function wndproc (ByVal hwnd As Long, ByVal Msg As Long, _ ByVal wParam As Long, ByVal lParam As Long) As Long ' interception down the message stored in the msg parameter. If (Msg = WM_QUERYENDSESSION) And (m_AllowExit = False) Then' message is detected, where you can adding processing code ' need attention, if not join any code here, then ate the equivalent of this message. Else' message if it is not to be processed, then sent back to the original program. wndproc = CallWindowProc (preWinProc, hwnd, Msg, wParam, lParam) End If End Function
To Search:
File list (Check if you may need any files):
VB不允许退出Windows\Form1.frm
...................\Module1.bas
...................\工程1.vbp
...................\工程1.vbw
VB不允许退出Windows