计算机关闭窗口可以使用alt,禁止使用Alt+F4关闭窗口完整代码
聲明:
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&
使用:
Private Sub Form_Load()
’Vb man 2001
’URL: http://goodvbman.yeah.net
’E-mail: coolde@21cn.com
Dim hwndMenu As Long
Dim c As Long
hwndMenu = GetSystemMenu(Me.hwnd, 0)
c = GetMenuItemCount(hwndMenu)
DeleteMenu hwndMenu, c - 1, MF_BYPOSITION
c = GetMenuItemCount(hwndMenu)
DeleteMenu hwndMenu, c - 1, MF_BYPOSITION
End Sub
總結
以上是生活随笔為你收集整理的计算机关闭窗口可以使用alt,禁止使用Alt+F4关闭窗口完整代码的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: python字典求平均值_Python
- 下一篇: python如何读取kepsever_p