找回密码
 加入
搜索
查看: 24490|回复: 60

[原创] 窗口特效测试程序附带源码

[复制链接]
发表于 2010-12-4 22:24:49 | 显示全部楼层 |阅读模式
本帖最后由 thealert 于 2010-12-4 22:55 编辑

方便大家学习窗口特效,做出该程序,相信对大家学习窗口特效是很有帮助的
建议结合此贴学习http://www.autoitx.com/thread-751-1-1.html
软件截图



加载皮肤


代码:
#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_icon=..\..\..\WINDOWS\system32\SHELL32.dll|-77
#AutoIt3Wrapper_outfile=C:\Documents and Settings\Administrator\桌面\窗口特效测试程序.exe
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_Res_Fileversion=0.0.0.2
#AutoIt3Wrapper_Res_Fileversion_AutoIncrement=p
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
#Region AutoIt3Wrapper 预编译参数(常用参数)
;#AutoIt3Wrapper_Res_Field=AutoIt Version|%AutoItVer%                ;自定义资源段
;#AutoIt3Wrapper_Run_Tidy=                                                   ;脚本整理
;#AutoIt3Wrapper_Run_Obfuscator=                                                      ;代码迷惑
;#AutoIt3Wrapper_Run_AU3Check=                                                                 ;语法检查
;#AutoIt3Wrapper_Run_Before=                                                                 ;运行前
;#AutoIt3Wrapper_Run_After=                                                                        ;运行后
#EndRegion AutoIt3Wrapper 预编译参数设置完成
#cs ____________________________________

 Au3 版本:
 脚本作者: 
        Email: 
        QQ/TM: 
 脚本版本: 
 脚本功能: 

#ce _______________脚本开始_________________



#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=c:\documents and settings\administrator\桌面\form2.kxf
$MainForm = GUICreate("窗口特效测试", 557, 264, 0, 0)
Skin()
$Group1 = GUICtrlCreateGroup("窗口打开方式", 8, 8, 313, 129)
GUICtrlSetFont(-1, 8, 800, 0, "华文新魏")
$Radio1 = GUICtrlCreateRadio("从左到右打开窗口", 32, 32, 129, 25)
GUICtrlSetFont(-1, 10, 800, 0, "华文新魏")
$Radio2 = GUICtrlCreateRadio("从右到左打开窗口", 176, 32, 129, 25)
GUICtrlSetFont(-1, 10, 800, 0, "华文新魏")
$Radio3 = GUICtrlCreateRadio("从上到下打开窗口", 32, 64, 129, 25)
GUICtrlSetFont(-1, 10, 800, 0, "华文新魏")
$Radio4 = GUICtrlCreateRadio("从下到上打开窗口", 176, 64, 137, 25)
GUICtrlSetFont(-1, 10, 800, 0, "华文新魏")
$Radio5 = GUICtrlCreateRadio("中间打开窗口", 96, 104, 113, 25)
GUICtrlSetFont(-1, 10, 800, 0, "华文新魏")
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group2 = GUICtrlCreateGroup("特效类型", 8, 152, 313, 97)
GUICtrlSetFont(-1, 8, 800, 0, "华文新魏")
$Radio6 = GUICtrlCreateRadio("窗口向内重叠", 24, 176, 105, 25)
GUICtrlSetFont(-1, 10, 800, 0, "华文新魏")
$Radio7 = GUICtrlCreateRadio("重获窗口交点", 184, 176, 129, 25)
GUICtrlSetFont(-1, 10, 800, 0, "华文新魏")
$Radio8 = GUICtrlCreateRadio("使用滑动类型", 24, 216, 113, 25)
GUICtrlSetFont(-1, 10, 800, 0, "华文新魏")
$Radio9 = GUICtrlCreateRadio("淡入淡出效果", 184, 216, 113, 25)
GUICtrlSetFont(-1, 10, 800, 0, "华文新魏")
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button1 = GUICtrlCreateButton("查看效果", 324, 208, 75, 41)
$Label1 = GUICtrlCreateLabel("当前生成的窗体十六进制值", 336, 160, 148, 16)
GUICtrlSetFont(-1, 8, 800, 0, "华文新魏")
$Button2 = GUICtrlCreateButton("退出", 488, 208, 65, 41)
$Label2 = GUICtrlCreateLabel("", 332, 180, 100, 20)
GUICtrlSetFont(-1, 10, 800, 0, "华文新魏")
$Edit1 = GUICtrlCreateEdit("", 328, 32, 209, 121, BitOR($ES_READONLY,$ES_WANTRETURN))
GUICtrlSetData(-1, StringFormat("AW_HOR_POSITIVE (0x00000001) \r\nAW_HOR_NEGATIVE (0x00000002) \r\nAW_VER_POSITIVE (0x00000004)\r\nAW_VER_NEGATIVE (0x00000008) \r\nAW_CENTER    (0x00000010) \r\nAW_HIDE     (0x00010000) \r\nAW_ACTIVATE   (0x00020000) \r\nAW_SLIDE     (0x00040000) \r\nAW_BLEND     (0x00080000) "))
$Label3 = GUICtrlCreateLabel("                    键值参考", 344, 8, 116, 17)
GUICtrlSetFont(-1, 10, 400, 0, "华文新魏")
$Button3 = GUICtrlCreateButton("窗口抖动", 408, 208, 65, 41)
#EndRegion ### END Koda GUI section ###



$SubForm = GUICreate("子窗体 窗口特效", 421, 195, 0, 300)
GUISwitch($MainForm)
GUISetState(@SW_SHOW)

While 1
        $nMsg = GUIGetMsg(1)
        Switch $nMsg[0]
                Case $GUI_EVENT_CLOSE
                        Switch $nMsg[1]
                                Case $MainForm
                                        Exit
                                Case $SubForm
                                        GUISwitch($SubForm)
                    GUISetState(@SW_HIDE)
                        EndSwitch
                        
        Case $Button1
                        Dim $kind1,$kind2
                        If BitAND(GUICtrlRead($radio1), $GUI_CHECKED) = $GUI_CHECKED Then
                                $kind1=0x00000001
                        ElseIf BitAND(GUICtrlRead($radio2), $GUI_CHECKED) = $GUI_CHECKED Then
                                $kind1=0x00000002
                        ElseIf BitAND(GUICtrlRead($radio3), $GUI_CHECKED) = $GUI_CHECKED Then
                                $kind1=0x00000004
                    ElseIf BitAND(GUICtrlRead($radio4), $GUI_CHECKED) = $GUI_CHECKED Then
                                $kind1=0x00000008
                        ElseIf BitAND(GUICtrlRead($radio5), $GUI_CHECKED) = $GUI_CHECKED Then
                                $kind1=0x00000010
                        EndIf
                        If BitAND(GUICtrlRead($radio6), $GUI_CHECKED) = $GUI_CHECKED Then
                                $kind2=0x00010000
                        ElseIf BitAND(GUICtrlRead($radio7), $GUI_CHECKED) = $GUI_CHECKED Then
                                $kind2=0x00020000
                        ElseIf BitAND(GUICtrlRead($radio8), $GUI_CHECKED) = $GUI_CHECKED Then
                                $kind2=0x00040000
                        ElseIf BitAND(GUICtrlRead($radio9), $GUI_CHECKED) = $GUI_CHECKED Then
                                $kind2=0x00080000        
                        EndIf        
                        $kind=Hex($kind1+$kind2)
                        GUICtrlSetData($Label2,"0x"&$kind)
                        fun("0x"&$kind)
                Case $Button2
                        Exit
                Case $Button3
                        Jitter()
        EndSwitch
WEnd

Func fun($allkind)
        
        DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $SubForm, "int", 2000, "long", $allkind)
        GUISwitch($SubForm)
        GUISetState(@SW_SHOW)
        Sleep(1000)
        GUISetState(@SW_HIDE)
EndFunc

Func Jitter()
 $sCoor = WinGetPos($MainForm)
 For $i = 1 To 4
 WinMove($MainForm, "", $sCoor[0] + 3, $sCoor[1] - 3, Default, Default, 1)
 WinMove($MainForm, "", $sCoor[0], $sCoor[1] - 6, Default, Default, 1)
 WinMove($MainForm, "", $sCoor[0] - 3, $sCoor[1] - 3, Default, Default, 1)
 WinMove($MainForm, "", $sCoor[0], $sCoor[1], Default, Default, 1)
 Next
EndFunc   ;==>_Jitter
Func Skin()
        $Dll = DllOpen('Skin.dll')
        DllCall($Dll, "int", "SkinH_AttachEx", "str", "wish.she", "str", "mhgd")
        DllCall($Dll, "int", "SkinH_SetAero", "int", 1)
EndFunc   ;==>Skin


软件下载





脚本




皮肤

本帖子中包含更多资源

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

×

评分

参与人数 1金钱 +10 收起 理由
xyold1 + 10 很不错啊

查看全部评分

 楼主| 发表于 2010-12-4 22:25:50 | 显示全部楼层
已经提供源代码,方便大家参考学习
发表于 2010-12-4 23:29:40 | 显示全部楼层
这个特效不错.学习了
发表于 2010-12-5 09:56:49 | 显示全部楼层
谢谢分享,楼主辛苦了,
 楼主| 发表于 2010-12-5 11:53:14 | 显示全部楼层
多谢支持 呵呵
 楼主| 发表于 2010-12-5 11:54:14 | 显示全部楼层
对啦 小弟金币有点少,有什么办法快速提高金币吗,大大教下,谢谢
发表于 2010-12-5 12:35:21 | 显示全部楼层
对啦 小弟金币有点少,有什么办法快速提高金币吗,大大教下,谢谢
thealert 发表于 2010-12-5 11:54



    多发帖子。
发表于 2010-12-5 13:05:36 | 显示全部楼层
这个效果看起来不错哦
发表于 2010-12-5 13:48:34 | 显示全部楼层
收集备用呵呵不错
发表于 2010-12-5 14:12:33 | 显示全部楼层
哇哦,, 好强大啊。。 收藏了。 谢谢分享
发表于 2010-12-5 16:10:19 | 显示全部楼层
留名,便于以后查看,嘿嘿,多谢分享
 楼主| 发表于 2010-12-5 16:56:46 | 显示全部楼层
回复 11# 飘云


    你们金币怎么那么多啊 怎么赚的 教教小弟 呵呵
发表于 2010-12-5 17:43:19 | 显示全部楼层
不错。。学习了
发表于 2010-12-5 20:23:09 | 显示全部楼层
这个要好好收藏!!
发表于 2010-12-5 21:05:51 | 显示全部楼层
不错!支持
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-3-29 01:02 , Processed in 0.079985 second(s), 22 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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