回复 3# iori2882
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <ButtonConstants.au3>
#include <GUIListBox.au3>
#include <ProgressConstants.au3>
Global Const $SC_MOVE = 0xF010
$Form1 = GUICreate("Form1", 613, 401, 292, 124, $WS_POPUP)
$Pic1 = GUICtrlCreatePic("", 0, 0, 613, 401, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS))
GUICtrlSetState(-1, $GUI_DISABLE);使控件不可用
$Button1 = GUICtrlCreateButton("电话查询", 8, 21, 67, 67)
$Button3 = GUICtrlCreateButton("IP相关", 96, 21, 67, 67)
$Button5 = GUICtrlCreateButton("实用应用", 184, 21, 67, 67)
$Button7 = GUICtrlCreateButton("校园内网", 272, 21, 67, 67)
$Button9 = GUICtrlCreateButton("备用", 360, 21, 67, 67)
$Button11 = GUICtrlCreateButton("备用", 448, 21, 67, 67)
$Button13 = GUICtrlCreateButton("管理员", 536, 21, 67, 67)
$Button2 = GUICtrlCreateButton("X", 584, 0, 17, 17)
$Button4 = GUICtrlCreateButton("□", 560, 0, 17, 17)
$Button6 = GUICtrlCreateButton("一", 536, 0, 17, 17)
$Progress1 = GUICtrlCreateProgress(0, 90, 613, 6)
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###
;=============================================================建立分页面一==================
$ne_gui1 = GUICreate("", 610, 285, 4, 101, $WS_POPUP, $WS_EX_MDICHILD, $Form1)
$Pic2 = GUICtrlCreatePic("", 0, 0, 619, 284, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS))
GUICtrlSetState(-1, $GUI_DISABLE);使控件不可用
GUISetState(@SW_SHOW)
While 1
_ReduceMemory(@AutoItPID)
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $GUI_EVENT_PRIMARYDOWN
_SendMessage($Form1, $WM_SYSCOMMAND, $SC_MOVE + $HTCAPTION, 0)
Case $Button2
ExitLoop
EndSwitch
WEnd
GUIDelete()
Func _ReduceMemory($i_PID = -1)
If $i_PID <> -1 Then
Local $ai_Handle = DllCall("kernel32.dll", 'int', 'OpenProcess', 'int', 0x1f0fff, 'int', False, 'int', $i_PID)
Local $ai_Return = DllCall("psapi.dll", 'int', 'EmptyWorkingSet', 'long', $ai_Handle[0])
DllCall('kernel32.dll', 'int', 'CloseHandle', 'int', $ai_Handle[0])
Else
Local $ai_Return = DllCall("psapi.dll", 'int', 'EmptyWorkingSet', 'long', -1)
EndIf
Return $ai_Return[0]
EndFunc ;==>_ReduceMemory
|