呼叫外部 執行檔的視窗<br>請問如何 用API 將 其視窗的 最大化/最小化 按鈕<br>移除 或 停用
'Form Code Private Declare Function GetSystemMenu Lib "user32" (ByVal hwnd As Long, ByVal bRevert As Long) As Long Private Declare Function GetMenuItemCount Lib "user32" (ByVal hMenu 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 Const MF_BYPOSITION = &H400& Private Sub DisableX() Dim hMenu As Long Dim nCount As Long hMenu = GetSystemMenu(Me.hWnd, 0) nCount = GetMenuItemCount(hMenu) 'Get rid of the Close menu and its separator Call RemoveMenu(hMenu, nCount - 1, MF_BYPOSITION) Call RemoveMenu(hMenu, nCount - 2, MF_BYPOSITION) 'Make sure the screen updates 'our change DrawMenuBar Me.hWnd End Sub Private Sub Form_Load() DisableX End Sub Private Sub Form_Click() 'We need a way out, since the X button 'doesn't work :-) Unload Me End Sub