不会最大化是因为窗口样式没设置 $WS_MAXIMIZEBOX
屏蔽双击(没屏蔽最大化按钮):
#include <GUIConstants.au3>
$hGUI = GUICreate("获取标题栏双击事件", 633, 447, 193, 125, BitOR($WS_MAXIMIZEBOX,$WS_MINIMIZEBOX,$WS_SYSMENU,$WS_CAPTION,$WS_POPUP,$WS_POPUPWINDOW,$WS_GROUP,$WS_TABSTOP,$WS_BORDER,$WS_CLIPSIBLINGS))
GUIRegisterMsg($WM_SYSCOMMAND, "WM_SYSCOMMAND")
GUISetState()
While 1
$GUIMsg = GUIGetMsg()
Switch $GUIMsg
Case $GUI_EVENT_CLOSE
ExitLoop
EndSwitch
WEnd
Exit
Func WM_SYSCOMMAND($hWnd, $Msg, $wParam, $lParam)
If $hWnd = $hGUI And $wParam =0x0f032 Then
TrayTip("Test","获取标题栏双击事件"&@HOUR&":"&@MIN&":"&@SEC,10)
Return 1
EndIf
EndFunc |