#NoTrayIcon
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <ButtonConstants.au3>
#Include <GuiImageList.au3>
#Include <GuiButton.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("form1", 688, 201, -1, -1,Bitor($WS_CAPTION,$WS_SYSMENU))
$Pic1 = GUICtrlCreatePic(@ScriptDir & "\banner.jpg", 0, 0, 687, 93)
$Button1 = GUICtrlCreateButton("按钮1", 400, 109, 75, 75 )
_GUICtrlButton_SetImageList($Button1, _GetImageListHandle("shell32.dll",-20, True),2,-1,12)
$Button2 = GUICtrlCreateButton("按钮2", 500, 109, 75, 75 )
_GUICtrlButton_SetImageList($Button2, _GetImageListHandle("shell32.dll",-279, True),2,-1,12)
$Button3 = GUICtrlCreateButton("按钮3", 600, 109, 75, 75 )
_GUICtrlButton_SetImageList($Button3, _GetImageListHandle("shell32.dll",-258, True),2,-1,12)
$Label1 = GUICtrlCreateLabel(" ★ 说明事项:" & @LF & "" & @LF & " ★ 待添加" & @LF & "" & @LF & " ★ 待添加", 0, 112, 350, 65)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
GUIDelete($Form1)
MsgBox(0, 0, "没了主窗体,只能在进程管理器中结束了")
Case $Button2
MsgBox(0, 0, "我是按扭")
Case $Button3
MsgBox(0, 0, "我是按扭")
EndSwitch
WEnd
Func _GetImageListHandle($sFile, $nIconID = 0, $fLarge = False)
Local $iSize = 16
If $fLarge Then $iSize = 32
Local $hImage = _GUIImageList_Create($iSize, $iSize, 5, 3)
If StringUpper(StringMid($sFile, StringLen($sFile) - 2)) = "BMP" Then
_GUIImageList_AddBitmap($hImage, $sFile)
Else
_GUIImageList_AddIcon($hImage, $sFile, $nIconID, $fLarge)
EndIf
Return $hImage
EndFunc ;==>_GetImageListHandle
|