|
![]() | 作者: hongliubo1 [hongliubo1]
![]() |
登录 |
Private Declare Function GetSystemMenu Lib "User32" (ByVal hwnd As Long, ByVal bRevert As Long) As Long Private Declare Function RemoveMenu Lib "User32" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long) As Long Private Declare Function DrawMenuBar Lib "User32" (ByVal hwnd As Long) As Long Private Declare Function GetMenuItemCount Lib "User32" (ByVal hMenu As Long) As Long Private Const MF_BYPOSITION = &H400& Private Sub Command1_Click() DisableClose Me End Sub Private Sub DisableClose(Frm As Form) Dim hMenu As Long, nCount As Long '获取系统菜单的句柄 hMenu = GetSystemMenu(Frm.hwnd, 0) '得到系统菜单的菜单项目 nCount = GetMenuItemCount(hMenu) '将关闭按钮置为无效 Call RemoveMenu(hMenu, nCount - 1, MF_BYPOSITION) '重画系统菜单 DrawMenuBar Frm.hwnd End Sub Private Sub Command2_Click() End End Sub |
地主 发表时间: 05-01-14 21:33 |
|
20CN网络安全小组版权所有
Copyright © 2000-2010 20CN Security Group. All Rights Reserved.
论坛程序编写:NetDemon
粤ICP备05087286号