d12990 发表于 2009-8-28 12:12:10

au3怎么实现启动窗口界面渐显效果呢

就像下面这个程序界面,au3可以实现吗,那个提示窗口不要的,谁能贴下源码,谢谢拉



:face (37):

大绯狼 发表于 2009-8-28 13:00:21

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 633, 447, 192, 124)
WinSetTrans("Form1", "", 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

$i=0
Do
        WinSetTrans("Form1", "", $I)
        $I += 1
Until $I = 255

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit

        EndSwitch
WEnd

d12990 发表于 2009-8-28 13:23:31

你好:有个小问题想请教下:如果启动一个外部程序的时候,比如记事本,怎么实现这种效果呢?

代码是一样的吗,我测试了下好像不行....望指点,谢谢

大绯狼 发表于 2009-8-28 13:56:40

run("notepad.exe",@WindowsDir,@SW_HIDE)
Sleep(100)
WinSetTrans("", "", 0)
WinSetState ("", "",@SW_SHOW)
WinActivate ("")
$i=0
Do
        WinSetTrans("", "", $I)
        $I += 1
Until $I = 255

d12990 发表于 2009-8-28 16:41:21

感谢提供相关代码,不过好像只能是记事本程序可以的,我尝试换其他的软件,比如QQ2009安装程序,好像还是实现不了那种效果,真奇怪了   
代码是不是还要修改下呢,谢谢

大绯狼 发表于 2009-8-28 16:51:40

测试正常
10字补丁

d12990 发表于 2009-8-28 20:17:15

我想安装的是这个软件:http://download.iciba.com/upwl/powerwordlite.38410.0.exe
安装的时候想让他出现窗口渐显的半透明效果,可以帮写个au3源码么?多谢多谢

:face (23):

sxd 发表于 2009-8-31 16:20:50

大灰狼这种 就是吃力不讨好类型了

如果一上来就不给代码 让楼主理解原理思路 那就不管什么软件都可以搞定了

而不是 2个人在这里浪费大家的事件

水木子 发表于 2009-8-31 21:23:28

本帖最后由 水木子 于 2009-8-31 21:26 编辑

我也是新人,大家共同学习吧!
不知道这样会不会让你更容易理解。#include <GUIConstantsEx.au3>
#include <SliderConstants.au3>
#include <WindowsConstants.au3>

$Form1 = GUICreate("滑动调整透明度", 400, 300, -1, -1)
$Label1 = GUICtrlCreateLabel("调整滑动条更改窗体透明度", 80, 80, 300, 30)
GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif")
$Slider1 = GUICtrlCreateSlider(50, 120, 300, 50)
GUICtrlSetLimit($Slider1, 250, 10)
GUICtrlSetData($Slider1,250)
GUISetState(@SW_SHOW)
AdlibEnable("xian", 100)

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit

        EndSwitch
WEnd

Func xian()
        $a = GUICtrlRead($Slider1)
        WinSetTrans("滑动调整透明度","",$a)
EndFunc       

hnzzlzj 发表于 2009-8-31 23:50:20

本帖最后由 hnzzlzj 于 2009-9-1 00:00 编辑

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

$hwnd = GUICreate("Animate Window", 300, 300)
$hwnd = GUICreate("Animate Window", 300, 300)
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 3000, "long", 0x00080000)
GUISetState()

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 3000, "long", 0x00090000)
                        Exit

        EndSwitch
WEnd

redapple2008 发表于 2009-8-31 23:55:07

SplashImageOn($cap, $pop,380,512,-1,780,16)
ToolTip ("请不要关闭,五秒后自动退出",820,650,"至尚公告",1)
Opt("WinTitleMatchMode", 2)
For $iTrans = 255 to 50 Step -0.5
WinSetTrans($cap, "", $iTrans)
NEXT
For $iTrans = 780 to 10 Step -0.01
    winmove($cap, "", default,$iTrans)
Next
For $iTrans = 50 to 255 Step 0.2
WinSetTrans($cap, "", $iTrans)
NEXT
Sleep(80000)
SplashOff()
Exit

sxd 发表于 2009-9-1 04:15:26

像这种问题 就应该说

循环 设置透明度
页: [1]
查看完整版本: au3怎么实现启动窗口界面渐显效果呢