autoking Posted September 17, 2012 Share Posted September 17, 2012 Hi. Is it possible to do when you hold the mouse over a button, it will make it transparent, and when you move the mouse away from the button, it will make it normal again? Link to comment Share on other sites More sharing options...
PlayHD Posted September 17, 2012 Share Posted September 17, 2012 (edited) take a look at Here is a exampleexpandcollapse popup#include "GUICtrlOnHover.au3" GUICreate("PlayHD Example") GUISetBkColor(0x00FF00) GUISetState() Global $Label[3] $Label[0] = GUICtrlCreateLabel("Label1",8,20) $Label[1] = GUICtrlCreateLabel("Label2",8,60) $Label[2] = GUICtrlCreateLabel("Label4",8,120,-1,-1,0x1000) ;;$SS_SUNKEN _GUICtrl_OnHoverRegister($Label[0],"onHover","onNormal") _GUICtrl_OnHoverRegister($Label[1],"onHover","onNormal") _GUICtrl_OnHoverRegister($Label[2],"onHover","onNormal") GUICtrlSetBkColor($Label[0],0xFF0000) GUICtrlSetBkColor($Label[1],0x0000FF) GUICtrlSetBkColor($Label[2],-2) While 1 $gMsg = GUIGetMsg() Switch $gMsg Case -3 ; X button Exit EndSwitch WEnd Func onHover($idCtrl) Switch $idCtrl Case $Label[0] GUICtrlSetBkColor($Label[0],-2) Case $Label[1] GUICtrlSetData($Label[1],"Hover") Case $Label[2] GUICtrlSetColor($Label[2],0xFF0000) EndSwitch EndFunc Func onNormal($idCtrl) Switch $idCtrl Case $Label[0] GUICtrlSetBkColor($Label[0],0xFF0000) Case $Label[1] GUICtrlSetData($Label[1],"Label1") Case $Label[2] GUICtrlSetColor($Label[2],-2) EndSwitch EndFunc Edited September 17, 2012 by PlayHD My UDF : _WinShake, _WinSplitMy Apps : Google Guitar Bot, PuzzleGameDesign Gui : Interesting Tabs Design, RBox Project (abandoned), Animated Gui on Exit Link to comment Share on other sites More sharing options...
UEZ Posted September 17, 2012 Share Posted September 17, 2012 @autoking: what do you mean with "make it transparent" exactly? Br, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
autoking Posted September 17, 2012 Author Share Posted September 17, 2012 WinSetTrans("[CLASS:Notepad]", "", 170) but just for buttons instead of a window title Link to comment Share on other sites More sharing options...
UEZ Posted September 17, 2012 Share Posted September 17, 2012 Soemthing like that here? expandcollapse popup#include <WindowsConstants.au3> #include <GUIConstantsEx.au3> $hGUI = GUICreate("Test", 300, 200) $hGUI_Child = GUICreate("", 100, 75, 100, 50, $WS_POPUP, $WS_EX_MDICHILD, $hGUI) $idButton = GUICtrlCreateButton("Test", 0, 0,100, 50) GUISetState(@SW_SHOW, $hGUI) GUISetState(@SW_SHOW, $hGUI_Child) Global $bUpdateOn = True, $bUpdateOFF = True Do $aCtrl = GUIGetCursorInfo($hGUI_Child) Switch $aCtrl[4] Case $idButton If $bUpdateOFF Then WinSetTrans($hGUI_Child, "", 0x60) $bUpdateOFF = False $bUpdateOn = True EndIf Case Else If $bUpdateOn Then WinSetTrans($hGUI_Child, "", 0xFF) $bUpdateOn = False $bUpdateOFF = True EndIf EndSwitch Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $idButton MsgBox(0, "Test", "Button was pressed") EndSwitch Until False GUIDelete($hGUI_Child) GUIDelete($hGUI) Exit Br, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
autoking Posted September 17, 2012 Author Share Posted September 17, 2012 that's just great thanks alot Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now