发信人: nyxi(南野秀一)
整理人: winsy(2003-04-22 11:37:59), 站内信件
|
Option Explicit
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 EnableMenuItem Lib "user32" _
(ByVal hMenu As Long, ByVal wIDEnableItem As Long, _
ByVal wEnable As Long) As Long
Const SC_CLOSE = &HF060
Private Sub MDIForm_Load()
Dim hMenu As Long
Load Form2//form2是MDI子窗口
hMenu = GetSystemMenu(Form2.hwnd, 0)
RemoveMenu hMenu, &HF060, &H200&
Debug.Print EnableMenuItem(hMenu, SC_CLOSE, 1)
End Sub
----
I hope that in time you will find
What you long for love
That's written in the stars
When you finally leave
I think you will see it
Somewhere in my broken heart |
|