使用slider来调整窗口的透明状态
最近在学习autoit,看到了一个很不错的例子,改变窗口的透明状态,今天转来和大家共享$gui = GuiCreate("MyGUI", 392, 86,-1, -1)
$Slider_1 = GuiCtrlCreateSlider(30, 10, 340, 60)
GUICtrlSetLimit ($Slider_1,255)
GUICtrlSetData($Slider_1, 255)
Global Const $WM_HSCROLL = 0x114
Global Const $TB_LINEUP = 0
Global Const $TB_LINEDOWN = 1
Global Const $TB_PAGEUP = 2
Global Const $TB_PAGEDOWN = 3
Global Const $TB_THUMBPOSITION = 4
Global Const $TB_THUMBTRACK = 5
GUIRegisterMsg($WM_HSCROLL, "MY_WM_HSCROLL")
GUISetState()
While 1
$msg = GUIGetMsg()
Select
Case $msg = -3
ExitLoop
Case Else
;;;
EndSelect
WEnd
Func MY_WM_HSCROLL($hWnd, $msg, $wParam, $lParam)
$nScrollCode = BitAnd($wParam, 0x0000FFFF)
$nPos = BitShift($wParam, 16)
$hwndScrollBar = $lParam
Switch $nScrollCode
Case $TB_LINEDOWN ,$TB_LINEUP,$TB_PAGEDOWN,$TB_PAGEUP,$TB_THUMBTRACK
WinSetTrans ($gui,"",GUICtrlRead($Slider_1))
EndSwitch
EndFunc 谢谢楼主,学习 了 试了一下,还是挺不错的,感谢楼主分享! 效果不错,收藏了 有意思哈哈,调用下.{:face (411):} 效果不错,收藏了 {:face (447):} 学习了 谢谢分享
页:
[1]