找回密码
 加入
搜索
查看: 138925|回复: 185

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

[复制链接]
发表于 2009-5-4 05:49:22 | 显示全部楼层 |阅读模式
#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[2] = [0, 0]
ClientToScreen($GUI, $aiTemp[0], $aiTemp[1])
Global $bgcolor = PixelGetColor($aiTemp[0], $aiTemp[1])
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[2] = [$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

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×

评分

参与人数 3金钱 +101 贡献 +10 收起 理由
lixiaolong + 31 很好
Duvet + 20 + 5
afan + 50 + 5

查看全部评分

发表于 2009-5-4 10:56:49 | 显示全部楼层
上个图就更爽拉!
发表于 2009-5-4 11:37:30 | 显示全部楼层
顶一个,谢了...
发表于 2009-5-4 12:20:58 | 显示全部楼层
dddddddddddddddddddd
发表于 2009-5-4 13:54:07 | 显示全部楼层
支持!!!!!!
发表于 2009-5-4 14:01:06 | 显示全部楼层
来顶一个,不错
发表于 2009-5-4 16:03:29 | 显示全部楼层
顶顶顶顶顶顶
发表于 2009-5-4 16:31:13 | 显示全部楼层
有图就好了 可以先看看
发表于 2009-5-4 16:31:19 | 显示全部楼层
以后最好发个贴图,不过这次还顶一下!
发表于 2009-5-4 17:13:48 | 显示全部楼层
玩得好开心啊你
发表于 2009-5-9 23:26:28 | 显示全部楼层
ddddddddddd
发表于 2009-5-11 20:31:01 | 显示全部楼层
发表于 2009-5-12 22:54:16 | 显示全部楼层
不好意思,分不够,谢谢!!
发表于 2009-5-12 22:54:29 | 显示全部楼层
不好意思,分不够,谢谢!!
发表于 2009-5-12 22:54:31 | 显示全部楼层
不好意思,分不够,谢谢!!
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-3-29 19:30 , Processed in 0.077675 second(s), 21 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表