本帖最后由 水木子 于 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
|