破帽遮颜 发表于 2009-5-4 05:49:22

一些GUI效果,蛮不错的~参考一下

#include <GUIConstants.au3>
#include "GUIEnhance.au3"

Opt("GUIOnEventMode", 1)
$GUI = GUICreate("", 350, 150)
$btnTL = GUICtrlCreateButton("Test Button", -80, -25, 80, 25)
GUICtrlSetResizing(-1, $GUI_DOCKALL)
$btnTR = GUICtrlCreateButton("Test Button", 600, -25, 80, 25)
GUICtrlSetResizing(-1, $GUI_DOCKALL)
$btnBL = GUICtrlCreateButton("Test Button", -80, 500, 80, 25)
GUICtrlSetResizing(-1, $GUI_DOCKALL)
$btnBR = GUICtrlCreateButton("Test Button", 600, 500, 80, 25)
GUICtrlSetResizing(-1, $GUI_DOCKALL)
$label1 = GUICtrlCreateLabel("This is a label for demonstration purposes.", 10, 30)
GUICtrlSetResizing(-1, $GUI_DOCKALL)
$label2 = GUICtrlCreateLabel("This is a label for demonstration purposes.", 10, 30)
GUICtrlSetResizing(-1, $GUI_DOCKALL)
$label3 = GUICtrlCreateLabel("This is a label for demonstration purposes.", 10, 60)
GUICtrlSetResizing(-1, $GUI_DOCKALL)
$label4 = GUICtrlCreateLabel("This is a label for demonstration purposes.", 10, 90, -1, 16)
GUICtrlSetResizing(-1, $GUI_DOCKALL)

_GUIEnhanceAnimateWin ($GUI, 1000, $GUI_EN_ANI_FADEIN)
GUISetState()
GUISetOnEvent($GUI_EVENT_CLOSE, "_exit")
Local $aiTemp =
ClientToScreen($GUI, $aiTemp, $aiTemp)
Global $bgcolor = PixelGetColor($aiTemp, $aiTemp)
ConsoleWrite($bgcolor & @CRLF)
GUICtrlSetColor($label1, $bgcolor)
_GUIEnhanceAnimateTitle ($GUI, "GUI Enhance UDF Test :: RazerM", $GUI_EN_TITLE_DROP)
Sleep(1000)
_GUIEnhanceAnimateTitle ($GUI, "GUI Enhance UDF Test :: RazerM", $GUI_EN_TITLE_SLIDE)
Sleep(1000)
_GUIEnhanceCtrlDrift ($GUI, $label4, 10, 120)
_GUIEnhanceCtrlDrift ($GUI, $label3, 10, 90)
_GUIEnhanceCtrlDrift ($GUI, $label2, 10, 60)
_GUIEnhanceCtrlFade ($label1, 3000, True, False, $bgcolor, 0x000000)
Local $aLabels = [$label2, $label3]
_GUIEnhanceCtrlFade ($aLabels, 1500, True, False, 0x000000, $bgcolor)
_GUIEnhanceCtrlDrift ($GUI, $label4, 10, 60)
_GUIEnhanceCtrlFade ($label4, 1000, False, True, $bgcolor, 0x000000)
_GUIEnhanceCtrlFade ($label4, 1000, True, False, 0x000000, 0xFF0000)
_GUIEnhanceCtrlFade ($label4, 1000, False, True, 0x000000, $bgcolor)

_GUIEnhanceScaleWin ($GUI, 250, 350, True, 10, 25) ;add 250 to width, add 350 to height, centre win: true

_GUiEnhanceCtrlDrift ($GUI, $btnTL, 305, 255, 2)
_GUiEnhanceCtrlDrift ($GUI, $btnTR, 215, 255, 4)
_GUiEnhanceCtrlDrift ($GUI, $btnBL, 305, 220, 6)
_GUiEnhanceCtrlDrift ($GUI, $btnBR, 215, 220, 8)

While 1
        Sleep(5000)
WEnd

Func ClientToScreen($hwnd, ByRef $x, ByRef $y)
        Local $stPoint = DllStructCreate("int;int")

        DllStructSetData($stPoint, 1, $x)
        DllStructSetData($stPoint, 2, $y)

        DllCall("user32.dll", "int", "ClientToScreen", "hwnd", $hwnd, "ptr", DllStructGetPtr($stPoint))

        $x = DllStructGetData($stPoint, 1)
        $y = DllStructGetData($stPoint, 2)
        ; release Struct not really needed as it is a local
        $stPoint = 0
EndFunc   ;==>ClientToScreen

Func _exit()
        _GUIEnhanceAnimateWin ($GUI, 700, $GUI_EN_ANI_FADEOUT)
        Exit
EndFunc   ;==>_exit

zz999 发表于 2009-5-4 10:56:49

上个图就更爽拉!

yangkaicheng 发表于 2009-5-4 11:37:30

顶一个,谢了...

zhenglei 发表于 2009-5-4 12:20:58

dddddddddddddddddddd

鸟人 发表于 2009-5-4 13:54:07

支持!!!!!!
:face (21):

botanycc 发表于 2009-5-4 14:01:06

来顶一个,不错

wher 发表于 2009-5-4 16:03:29

顶顶顶顶顶顶:face (29):

netbadbug 发表于 2009-5-4 16:31:13

有图就好了 可以先看看

forestchi 发表于 2009-5-4 16:31:19

以后最好发个贴图,不过这次还顶一下!

UID 发表于 2009-5-4 17:13:48

玩得好开心啊你

ydpd 发表于 2009-5-9 23:26:28

ddddddddddd

bland 发表于 2009-5-11 20:31:01

:face (36):

lnlzh 发表于 2009-5-12 22:54:16

不好意思,分不够,谢谢!!

lnlzh 发表于 2009-5-12 22:54:29

不好意思,分不够,谢谢!!

lnlzh 发表于 2009-5-12 22:54:31

不好意思,分不够,谢谢!!
页: [1] 2 3 4 5 6 7 8 9 10
查看完整版本: 一些GUI效果,蛮不错的~参考一下