這是個令右上角關閉消失的API
Public Declare Function GetSystemMenu Lib "user32" (ByVal hwnd As Long, ByVal bRevert As Long) As Long
Public Declare Function RemoveMenu Lib "user32" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long) As Long
Const MF_BYPOSITION = &H400
SystemMenu% = GetSystemMenu(hwnd, 0)
Res% = RemoveMenu(SystemMenu%, 5, MF_BYPOSITION)
Res% = RemoveMenu(SystemMenu%, 5, MF_BYPOSITION)
這段source 是阿呆在紀大哥的網站找到的, 並且在Win98 試驗過已經成功. 但當阿呆在NT 試驗時,
卻出現了"溢位"的 message ,說 SystemMenu% = GetSystemMenu(hwnd, 0) 這句出現溢位,但在98 是能操作的.
阿呆想問問如何能解決這問題, 謝謝!