声明:
'Vb man 2001'URL: http://goodvbman.yeah.net'E-mail: coolde@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&
使用:
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
