Prohibit the use of Alt + F4 close window

zhaozj2021-02-11  191

Prohibit the use of Alt F4 close window

Disclaimer: 'VB Man 2001'url: http://goodvbman.yeah.net'e-mail: Colde@21cn.comPrivate Declare Function GetSystemMenu lib "user32" Alias ​​"getSystemMenu" (Byval Hwnd As Long, Byval Brevert As long) As LongPrivate Declare Function DeleteMenu Lib "user32" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long) As LongPrivate Declare Function GetMenuItemCount Lib "user32" (ByVal hMenu As Long) As LongPrivate Const MF_BYPOSITION = & H400 & use:

Private Sub Form_Load () 'VB Man 2001'URL: http://goodvbman.yeah.net' e-mail: Colde@21cn.comdim HWndMenu As Longdim C As LonghwndMenu = GetSystemMenu (Me.hWnd, 0) C = GetMenuItemcount HWndmenu HWndMenu, C - 1, MF_BYPSITIONC = GetMenuItemcount (HWndMenu) deleteMenu HWndMenu, C - 1, MF_BYPSIOND SUB

转载请注明原文地址:https://www.9cbs.com/read-4867.html

New Post(0)