下面图老师小编要跟大家分享禁止使用 Alt+F4 关闭窗口,简单的过程中其实暗藏玄机,还是要细心学习,喜欢还请记得收藏哦!
【 tulaoshi.com - 编程语言 】
声明:
Private Declare Function GetSystemMenu Lib "user32" Alias "GetSystemMenu" (ByVal hwnd As Long, ByVal bRevert As Long) As Long
Private Declare Function DeleteMenu Lib "user32" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long) As Long
Private Declare Function GetMenuItemCount Lib "user32" (ByVal hMenu As Long) As Long Private Const MF_BYPOSITION = &H400&
(本文来源于图老师网站,更多请访问http://www.tulaoshi.com/bianchengyuyan/)使用:
Private Sub Form_Load()'Vb man 2001'URL: http://goodvbman.yeah.net'E-mail: coolde@21cn.comDim hwndMenu As LongDim c As LonghwndMenu = GetSystemMenu(Me.hwnd, 0)c = GetMenuItemCount(hwndMenu)DeleteMenu hwndMenu, c - 1, MF_BYPOSITIONc = GetMenuItemCount(hwndMenu)DeleteMenu hwndMenu, c - 1, MF_BYPOSITIONEnd Sub(本文来源于图老师网站,更多请访问http://www.tulaoshi.com/bianchengyuyan/)
来源:http://www.tulaoshi.com/n/20160219/1608374.html
看过《禁止使用 Alt+F4 关闭窗口》的人还看了以下文章 更多>>