找回密码
 加入
搜索
查看: 2916|回复: 8

[AU3基础] 打开关闭脚本时的一种效果……【已解决】

  [复制链接]
发表于 2010-3-14 12:14:56 | 显示全部楼层 |阅读模式
本帖最后由 xhf100 于 2010-3-18 14:45 编辑

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 122, 65, 192, 124)
$Button1 = GUICtrlCreateButton("Button1", 24, 16, 75, 25)

DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $Form1, "int", 1000, "long", 0x00000008)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
  Case $GUI_EVENT_CLOSE
   Exit
  Case $Button1
  DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $Form1, "int", 1000, "long", 0x00010004)
Exit
EndSwitch
WEnd

打开效果:从下到上。
关闭效果:从上到下。

评分

参与人数 1金钱 +10 收起 理由
afan + 10 感谢主动将修改帖子分类为[已解决],请继续 ...

查看全部评分

 楼主| 发表于 2010-3-14 12:21:45 | 显示全部楼层
还有一个关闭窗口逐渐消失的脚本,也不会用。。。。不知道放在脚本的什么地方。。


$hwnd = GUICreate("渐变窗口", 400, 300)
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00080000)
GUISetState()
Sleep(2000)
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00090000)
 楼主| 发表于 2010-3-14 13:48:27 | 显示全部楼层
关闭窗口逐渐消失的脚本,开打的时候逐渐清晰倒是可以,但是关闭关闭窗口逐渐消失,不知道怎么用。
发表于 2010-3-14 13:51:32 | 显示全部楼层
语无伦次……
发表于 2010-3-14 13:53:54 | 显示全部楼层
现在帮忙解决问题———基本靠猜!
发表于 2010-3-14 13:59:49 | 显示全部楼层
我严重支持楼上两楼
发表于 2010-3-14 16:09:55 | 显示全部楼层
退出的话

DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00090000)
放在
exit前面。
发表于 2010-3-14 16:11:15 | 显示全部楼层
楼主想达到什么样的目的?我猜测是想把"单击窗口退出"这段代码放到他的源码里面
 楼主| 发表于 2010-3-18 14:42:32 | 显示全部楼层
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 122, 65, 192, 124)
$Button1 = GUICtrlCreateButton("Button1", 24, 16, 75, 25)

DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $Form1, "int", 1000, "long", 0x00000008)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
  Case $GUI_EVENT_CLOSE
   Exit
  Case $Button1
  DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $Form1, "int", 1000, "long", 0x00010004)
Exit
EndSwitch
WEnd

打开效果:从下到上。
关闭效果:从上到下。
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-6-18 01:26 , Processed in 0.092738 second(s), 28 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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