API函数GetSystemMenu、DeleteMenu、GetMenuString可以实现Private Declare Function GetSystemMenu Lib "user32" (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 GetMenuString Lib "user32" Alias "GetMenuStringA" (ByVal hMenu As Long, ByVal wIDItem As Long, ByVal lpString As String, ByVal nMaxCount As Long, ByVal wFlag As Long) As LonghMenu = GetSystemMenu(Me.hWnd, 0)
CloseStr = String(255, 0)
Call GetMenuString(hMenu, &HF060, CloseStr, 256, &H0&)
CloseStr = Left(CloseStr, InStr(1, CloseStr, Chr(0)) - 1)
Call DeleteMenu(hMenu, &HF060, &H0&)