本帖最后由 风行者 于 2012-1-21 01:43 编辑
目的方便用的时候查看,需要的就拿去吧
#include <WindowsConstants.au3>
GUICreate('全部按钮', Default, Default, Default, Default,BitOR($GUI_SS_DEFAULT_GUI,$WS_MAXIMIZEBOX))
GUISetState()
Do
Until GUIGetMsg() = -3
#include <WindowsConstants.au3>
GUICreate('空白窗口', Default, Default, Default, Default, $WS_CAPTION)
GUISetState()
Do
Until GUIGetMsg() = -3
#include <WindowsConstants.au3>
GUICreate('只有关闭按钮', Default, Default, Default, Default, Bitor($WS_CAPTION,$WS_SYSMENU))
GUISetState()
Do
Until GUIGetMsg() = -3
#include <WindowsConstants.au3>
GUICreate('最小化按钮不可用', Default, Default, Default, Default,$GUI_SS_DEFAULT_GUI - $WS_MAXIMIZEBOX)
GUISetState()
Do
Until GUIGetMsg() = -3
#include <WindowsConstants.au3>
Const $SC_CLOSE = 0xF060
Const $MF_BYCOMMAND = 0x00000000
Const $MF_GRAYED = 0x00000001
$Form = GUICreate("关闭按钮不可用")
; EnableMenultem(GetSystemMenu(hwnd,FALSE),SC_CLOSE,MF_BYCOMMAND I MF_GRAYED);
$HWND = DllCall("User32.dll","HANDLE","GetSystemMenu","HWND",$Form,"BOOL",False) ;得到菜单句柄
DllCall("User32.dll","BOOL","EnableMenuItem","HANDLE",$HWND[0],"UINT",$SC_CLOSE,"UINT",BitOR($MF_BYCOMMAND,$MF_GRAYED))
GUISetState()
Do
Until GUIGetMsg() = -3
上面使用she皮肤之后没用,改用下面代码可以解决
$dll = DllOpen(@TempDir &"\mySkin.dll")
DllCall($Dll, "int", "SkinH_AttachEx", "str", $skins, "str", "mhgd")
DllCall($Dll, "int", "SkinH_SetAero", "int", 1)
Const $SC_CLOSE = 0xF060
Const $MF_REMOVE = 0x01000
$Form = GUICreate("关闭按钮不可用")
$HWND = DllCall("User32.dll","HANDLE","GetSystemMenu","HWND",$Form,"BOOL",False) ;得到菜单句柄
DllCall("User32.dll","bool","RemoveMenu","handle",$HWND[0],"uint",$SC_CLOSE,"uint",$MF_REMOVE)
GUISetState()
Do
Until GUIGetMsg() = -3
#include <WindowsConstants.au3>
GUICreate('无边框', Default, Default, Default, Default,BitOR($WS_SYSMENU, $WS_POPUP))
GUISetState()
Do
Until GUIGetMsg() = -3
#Include <WinAPI.au3>
#Include <WinAPIEx.au3>
#Include <WindowsConstants.au3>
$hForm = GUICreate('无控制菜单',Default,Default,Default,Default, BitOR($WS_CAPTION, $WS_POPUP, $WS_SYSMENU), $WS_EX_DLGMODALFRAME)
_WinAPI_DestroyIcon(_WinAPI_GetClassLongEx($hForm, $GCL_HICON))
_WinAPI_SetClassLongEx($hForm, $GCL_HICON, 0)
_WinAPI_SetClassLongEx($hForm, $GCL_HICONSM, 0)
GUISetState()
Do
Until GUIGetMsg() = -3
GUICreate("我不会在任务栏显示", 400, 300, -1, -1, -1, -1, WinGetHandle(AutoItWinGetTitle()))
GUISetState()
Do
Until GUIGetMsg() = -3
|