找回密码
 加入
搜索
楼主: 131738

[特效] 新栏开章, 凑个热闹,无边框渐大渐小(扩大/缩小)的效果 GUI 效果

 火... [复制链接]
发表于 2011-10-29 22:58:56 | 显示全部楼层
回复 32# 131738
Global Const $AW_SLIDE = 0x00040000
Global Const $AW_ACTIVATE = 0x00020000
Global Const $AW_BLEND = 0x00080000
Global Const $AW_HIDE = 0x00010000
Global Const $AW_CENTER = 0x00000010
Global Const $AW_HOR_POSITIVE = 0x00000001
Global Const $AW_HOR_NEGATIVE = 0x00000002
Global Const $AW_VER_POSITIVE = 0x00000004
Global Const $AW_VER_NEGATIVE = 0x00000008
Global Const $AW_FADE_IN = 0x00080000 ;fade-in
Global Const $AW_FADE_OUT = 0x00090000;fade-out
Global Const $AW_SLIDE_IN_LEFT = 0x00040001 ;slide in from left
Global Const $AW_SLIDE_OUT_LEFT = 0x00050002 ;slide out to left
Global Const $AW_SLIDE_IN_RIGHT = 0x00040002 ;slide in from right
Global Const $AW_SLIDE_OUT_RIGHT = 0x00050001 ;slide out to right
Global Const $AW_SLIDE_IN_TOP = 0x00040004 ;slide-in from top
Global Const $AW_SLIDE_OUT_TOP = 0x00050008 ;slide-out to top
Global Const $AW_SLIDE_IN_BOTTOM = 0x00040008 ;slide-in from bottom
Global Const $AW_SLIDE_OUT_BOTTOM = 0x00050004 ;slide-out to bottom
Global Const $AW_DIAG_SLIDE_IN_TOPLEFT = 0x00040005 ;diag slide-in from Top-left
Global Const $AW_DIAG_SLIDE_OUT_TOPLEFT = 0x0005000a ;diag slide-out to Top-left
Global Const $AW_DIAG_SLIDE_IN_TOPRIGHT = 0x00040006 ;diag slide-in from Top-Right
Global Const $AW_DIAG_SLIDE_OUT_TOPRIGHT = 0x00050009 ;diag slide-out to Top-Right
Global Const $AW_DIAG_SLIDE_IN_BOTTOMLEFT = 0x00040009 ;diag slide-in from Bottom-left
Global Const $AW_DIAG_SLIDE_OUT_BOTTOMLEFT = 0x00050006 ;diag slide-out to Bottom-left
Global Const $AW_DIAG_SLIDE_IN_BOTTOMRIGHT = 0x0004000a ;diag slide-in from Bottom-right
Global Const $AW_DIAG_SLIDE_OUT_BOTTOMRIGHT = 0x00050005 ;diag slide-out to Bottom-right
Global Const $AW_EXPLODE = 0x00040010 ;explode
Global Const $AW_IMPLODE = 0x00050010 ;implode
有些常量是原来的api里没有的
 楼主| 发表于 2011-10-30 01:43:05 | 显示全部楼层
本帖最后由 131738 于 2011-10-30 01:45 编辑

回复 33# netegg

原来这样,实在不知,不过上表前 10 个 5.3 已经有了! 你这些资料如何得来的?
发表于 2011-10-30 21:51:42 | 显示全部楼层
本帖最后由 netegg 于 2011-11-1 01:38 编辑

官网上有些函数参数是不在任何udf里的
 楼主| 发表于 2011-10-31 00:40:16 | 显示全部楼层
回复 35# netegg

哦。。。。
发表于 2011-11-5 21:28:37 | 显示全部楼层
回复 24# annybaby


    强大~!
   留下脚印,待用。
   MSDN: http://msdn.microsoft.com/zh-cn/library/ms632669
 楼主| 发表于 2011-11-6 17:08:43 | 显示全部楼层
回复  annybaby


    强大~!
   留下脚印,待用。
   MSDN:
xiehuahere 发表于 2011-11-5 21:28


还是没有蛋蛋 33 楼的参数多哦。。。。
发表于 2011-11-6 21:23:10 | 显示全部楼层
本帖最后由 xiehuahere 于 2011-11-6 21:28 编辑

回复 38# 131738

是的,刚注意到。这样应该全了吧:
Global Const $AW_SLIDE = 0x00040000        ;使用滑动类型, 默认为该类型. 当使用 AW_CENTER 效果时, 此效果被忽略
Global Const $AW_ACTIVATE = 0x00020000        ;激活窗口, 在使用了 AW_HIDE 效果时不可使用此效果
Global Const $AW_BLEND = 0x00080000        ;使用淡入效果
Global Const $AW_HIDE = 0x00010000 ; 只与其他效果组合使用
Global Const $AW_CENTER = 0x00000010 ;与 AW_HIDE 配合使用效果为窗口向内重叠, 单独使用(等同于与默认的AW_SLIDE一起使用)窗口向外扩展
Global Const $AW_HOR_POSITIVE = 0x00000001 ;自左向右显示窗口
Global Const $AW_HOR_NEGATIVE = 0x00000002 ;自右向左显示窗口
Global Const $AW_VER_POSITIVE = 0x00000004 ; 自顶向下显示窗口
Global Const $AW_VER_NEGATIVE = 0x00000008 ; 自下向上显示窗口
Global Const $AW_FADE_IN = 0x00080000 ;fade-in
Global Const $AW_FADE_OUT = 0x00090000;fade-out
Global Const $AW_SLIDE_IN_LEFT = 0x00040001 ;slide in from left
Global Const $AW_SLIDE_OUT_LEFT = 0x00050002 ;slide out to left
Global Const $AW_SLIDE_IN_RIGHT = 0x00040002 ;slide in from right
Global Const $AW_SLIDE_OUT_RIGHT = 0x00050001 ;slide out to right
Global Const $AW_SLIDE_IN_TOP = 0x00040004 ;slide-in from top
Global Const $AW_SLIDE_OUT_TOP = 0x00050008 ;slide-out to top
Global Const $AW_SLIDE_IN_BOTTOM = 0x00040008 ;slide-in from bottom
Global Const $AW_SLIDE_OUT_BOTTOM = 0x00050004 ;slide-out to bottom
Global Const $AW_DIAG_SLIDE_IN_TOPLEFT = 0x00040005 ;diag slide-in from Top-left
Global Const $AW_DIAG_SLIDE_OUT_TOPLEFT = 0x0005000a ;diag slide-out to Top-left
Global Const $AW_DIAG_SLIDE_IN_TOPRIGHT = 0x00040006 ;diag slide-in from Top-Right
Global Const $AW_DIAG_SLIDE_OUT_TOPRIGHT = 0x00050009 ;diag slide-out to Top-Right
Global Const $AW_DIAG_SLIDE_IN_BOTTOMLEFT = 0x00040009 ;diag slide-in from Bottom-left
Global Const $AW_DIAG_SLIDE_OUT_BOTTOMLEFT = 0x00050006 ;diag slide-out to Bottom-left
Global Const $AW_DIAG_SLIDE_IN_BOTTOMRIGHT = 0x0004000a ;diag slide-in from Bottom-right
Global Const $AW_DIAG_SLIDE_OUT_BOTTOMRIGHT = 0x00050005 ;diag slide-out to Bottom-right
Global Const $AW_EXPLODE = 0x00040010 ;explode
Global Const $AW_IMPLODE = 0x00050010 ;implode

HotKeySet("{ESC}", "Terminate")

$hwnd = GUICreate("Animate Window", 800, 600,-1,-1,0x80000000) ; 0x80000000: WS_POPUP
GUISetBkColor(0xFFEBCD)
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 2000, "long", $AW_BLEND)
GUISetState()
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 2000, "long", BitOR($AW_VER_POSITIVE, $AW_HIDE))
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 2000, "long", $AW_VER_NEGATIVE)
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 2000, "long", BitOR($AW_SLIDE, $AW_HOR_NEGATIVE, $AW_HIDE))
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 2000, "long", BitOR($AW_SLIDE, $AW_HOR_POSITIVE))
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 2000, "long", BitOR($AW_HIDE, $AW_CENTER))
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 2000, "long", $AW_CENTER)
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 2000, "long", $AW_ACTIVATE)
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 2000, "long", BitOR($AW_HIDE, $AW_IMPLODE))
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 2000, "long", $AW_FADE_IN);fade-in
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 2000, "long", $AW_FADE_OUT);fade-out
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 2000, "long", $AW_SLIDE_IN_LEFT);slide in from left
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 2000, "long", $AW_SLIDE_OUT_LEFT);slide out to left
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 2000, "long", $AW_SLIDE_IN_RIGHT);slide in from right
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 2000, "long", $AW_SLIDE_OUT_RIGHT);slide out to right
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 2000, "long", $AW_SLIDE_IN_TOP);slide-in from top
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 2000, "long", $AW_SLIDE_OUT_TOP);slide-out to top
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 2000, "long", $AW_SLIDE_IN_BOTTOM);slide-in from bottom
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 2000, "long", $AW_SLIDE_OUT_BOTTOM);slide-out to bottom
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 2000, "long", $AW_DIAG_SLIDE_IN_TOPLEFT);diag slide-in from Top-left
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 2000, "long", $AW_DIAG_SLIDE_OUT_TOPLEFT);diag slide-out to Top-left
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 2000, "long", $AW_DIAG_SLIDE_IN_TOPRIGHT);diag slide-in from Top-Right
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 2000, "long", $AW_DIAG_SLIDE_OUT_TOPRIGHT);diag slide-out to Top-Right
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 2000, "long", $AW_DIAG_SLIDE_IN_BOTTOMLEFT);diag slide-in from Bottom-left
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 2000, "long", $AW_DIAG_SLIDE_OUT_BOTTOMLEFT);diag slide-out to Bottom-left
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 2000, "long", $AW_DIAG_SLIDE_IN_BOTTOMRIGHT);diag slide-in from Bottom-right
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 2000, "long", $AW_DIAG_SLIDE_OUT_BOTTOMRIGHT);diag slide-out to Bottom-right
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 2000, "long", $AW_EXPLODE);explode
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 2000, "long", $AW_IMPLODE);implode

Func Terminate()
    Exit
EndFunc
不过有些效果貌似没什么区别。
比如,
AW_BLEND 和 AW_FADE_IN
AW_CENTER 和 AW_EXPLODE
(AW_HIDE 与 AW_CENTER的组合) 和 AW_IMPLODE
 楼主| 发表于 2011-11-6 22:31:12 | 显示全部楼层
回复  131738

是的,刚注意到。这样应该全了吧:不过有些效果貌似没什么区别。
比如,
AW_BLEND 和 A ...
xiehuahere 发表于 2011-11-6 21:23


又一个高手!不过对你这图像没什么印象。。。。好像新来的。。。但已注册快 1 年半了。。。呵呵!!!
发表于 2011-11-7 10:16:08 | 显示全部楼层
回复 40# 131738


我不是高手,我是来向高手和元老们学习的,还需要不断积累。
头像最近刚换,原先就是论坛默认。论坛高手太多,不求混个脸熟,潜水也能得道。要是能有时间经常泡论坛,肯定会成长很快。
发表于 2011-11-7 13:17:17 | 显示全部楼层
效果很好  但Esc退出没了  怎样加入Esc退出?
发表于 2011-11-8 14:55:25 | 显示全部楼层
回复 42# Qokelate
加点sleep就可以了。
Global Const $AW_SLIDE = 0x00040000        ;使用滑动类型, 默认为该类型. 当使用 AW_CENTER 效果时, 此效果被忽略
Global Const $AW_ACTIVATE = 0x00020000        ;激活窗口, 在使用了 AW_HIDE 效果时不可使用此效果
Global Const $AW_BLEND = 0x00080000        ;使用淡入效果
Global Const $AW_HIDE = 0x00010000 ; 只与其他效果组合使用
Global Const $AW_CENTER = 0x00000010 ;与 AW_HIDE 配合使用效果为窗口向内重叠, 单独使用(等同于与默认的AW_SLIDE一起使用)窗口向外扩展
Global Const $AW_HOR_POSITIVE = 0x00000001 ;自左向右显示窗口
Global Const $AW_HOR_NEGATIVE = 0x00000002 ;自右向左显示窗口
Global Const $AW_VER_POSITIVE = 0x00000004 ; 自顶向下显示窗口
Global Const $AW_VER_NEGATIVE = 0x00000008 ; 自下向上显示窗口
Global Const $AW_FADE_IN = 0x00080000 ;fade-in
Global Const $AW_FADE_OUT = 0x00090000;fade-out
Global Const $AW_SLIDE_IN_LEFT = 0x00040001 ;slide in from left
Global Const $AW_SLIDE_OUT_LEFT = 0x00050002 ;slide out to left
Global Const $AW_SLIDE_IN_RIGHT = 0x00040002 ;slide in from right
Global Const $AW_SLIDE_OUT_RIGHT = 0x00050001 ;slide out to right
Global Const $AW_SLIDE_IN_TOP = 0x00040004 ;slide-in from top
Global Const $AW_SLIDE_OUT_TOP = 0x00050008 ;slide-out to top
Global Const $AW_SLIDE_IN_BOTTOM = 0x00040008 ;slide-in from bottom
Global Const $AW_SLIDE_OUT_BOTTOM = 0x00050004 ;slide-out to bottom
Global Const $AW_DIAG_SLIDE_IN_TOPLEFT = 0x00040005 ;diag slide-in from Top-left
Global Const $AW_DIAG_SLIDE_OUT_TOPLEFT = 0x0005000a ;diag slide-out to Top-left
Global Const $AW_DIAG_SLIDE_IN_TOPRIGHT = 0x00040006 ;diag slide-in from Top-Right
Global Const $AW_DIAG_SLIDE_OUT_TOPRIGHT = 0x00050009 ;diag slide-out to Top-Right
Global Const $AW_DIAG_SLIDE_IN_BOTTOMLEFT = 0x00040009 ;diag slide-in from Bottom-left
Global Const $AW_DIAG_SLIDE_OUT_BOTTOMLEFT = 0x00050006 ;diag slide-out to Bottom-left
Global Const $AW_DIAG_SLIDE_IN_BOTTOMRIGHT = 0x0004000a ;diag slide-in from Bottom-right
Global Const $AW_DIAG_SLIDE_OUT_BOTTOMRIGHT = 0x00050005 ;diag slide-out to Bottom-right
Global Const $AW_EXPLODE = 0x00040010 ;explode
Global Const $AW_IMPLODE = 0x00050010 ;implode

HotKeySet("{ESC}", "Terminate")

$hwnd = GUICreate("Animate Window", 800, 600,-1,-1,0x80000000) ; 0x80000000: WS_POPUP
GUISetBkColor(0xFFEBCD)
_AnimateWindow($AW_BLEND)
GUISetState()
_AnimateWindow(BitOR($AW_VER_POSITIVE, $AW_HIDE))
_AnimateWindow($AW_VER_NEGATIVE)
_AnimateWindow(BitOR($AW_SLIDE, $AW_HOR_NEGATIVE, $AW_HIDE))
_AnimateWindow(BitOR($AW_SLIDE, $AW_HOR_POSITIVE))
_AnimateWindow(BitOR($AW_HIDE, $AW_CENTER))
_AnimateWindow($AW_CENTER)
_AnimateWindow($AW_ACTIVATE)
_AnimateWindow(BitOR($AW_HIDE, $AW_IMPLODE))
_AnimateWindow($AW_FADE_IN)
_AnimateWindow($AW_FADE_OUT)
_AnimateWindow($AW_SLIDE_IN_LEFT)
_AnimateWindow($AW_SLIDE_OUT_LEFT)
_AnimateWindow($AW_SLIDE_IN_RIGHT)
_AnimateWindow($AW_SLIDE_OUT_RIGHT)
_AnimateWindow($AW_SLIDE_IN_TOP)
_AnimateWindow($AW_SLIDE_OUT_TOP)
_AnimateWindow($AW_SLIDE_IN_BOTTOM)
_AnimateWindow($AW_SLIDE_OUT_BOTTOM)
_AnimateWindow($AW_DIAG_SLIDE_IN_TOPLEFT)
_AnimateWindow($AW_DIAG_SLIDE_OUT_TOPLEFT)
_AnimateWindow($AW_DIAG_SLIDE_IN_TOPRIGHT)
_AnimateWindow($AW_DIAG_SLIDE_OUT_TOPRIGHT)
_AnimateWindow($AW_DIAG_SLIDE_IN_BOTTOMLEFT)
_AnimateWindow($AW_DIAG_SLIDE_OUT_BOTTOMLEFT)
_AnimateWindow($AW_DIAG_SLIDE_IN_BOTTOMRIGHT)
_AnimateWindow($AW_DIAG_SLIDE_OUT_BOTTOMRIGHT)
_AnimateWindow($AW_EXPLODE)
_AnimateWindow($AW_IMPLODE)

Func Terminate()
    Exit
EndFunc

Func _AnimateWindow($effect)
        DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 2000, "long", $effect)
        Sleep(100)
EndFunc
发表于 2012-5-16 15:14:44 | 显示全部楼层
好 ,效果不错
发表于 2014-5-11 22:29:20 | 显示全部楼层
好东西呀收下了呀
发表于 2014-5-12 21:50:08 | 显示全部楼层
谢谢。楼主。
发表于 2014-10-28 16:44:38 | 显示全部楼层
很经典的代码,收藏了
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-12-22 11:52 , Processed in 0.072739 second(s), 14 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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