VBGood网站全文搜索 Google

搜索VBGood全站网页(全文搜索)
首页 - 经验之谈 - 禁止使用 Alt+F4 关闭窗口
发表评论(0)作者:, 平台:, 阅读:11561, 日期:2000-03-12
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()

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