JackER4565 Posted December 6, 2019 Share Posted December 6, 2019 (edited) Hi I just wanted to share the tree I've made with all of you. Made it myself with a little help of the forum and google. This uses an example from @Chimp in this post, then I added the movable part, you exit by pressing 'end'. #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=tree.ico #AutoIt3Wrapper_AU3Check_Stop_OnWarning=y #AutoIt3Wrapper_Run_Tidy=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <WinAPISysWin.au3> #include <GUIConstants.au3> #include <Misc.au3> ; for _IsPressed (23 END key) ;FileInstall("***\tree.gif", @ScriptDir & "\tree.gif") ;<<<<<<<<<< include ur gif file here Local $hDLL = DllOpen("user32.dll"), $oIE = ObjCreate("Shell.Explorer.2") Local $hBackground = GUICreate("", 350, 470, 20, 20, $WS_POPUP, $WS_EX_LAYERED + $WS_EX_TOPMOST) GUISetBkColor(0xffffff) Local $AlphaKey = 0xffffff $hLabel = GUICtrlCreateLabel("", 0, 0, 350, 450, -1, $GUI_WS_EX_PARENTDRAG) _WinAPI_SetLayeredWindowAttributes($hBackground, $AlphaKey, 0, $LWA_COLORKEY) GUISetState(@SW_SHOW, $hBackground) $hIE = GUICtrlCreateObj($oIE, -20, -5, 410, 480) ; <- embedd $oIE in the AutoIt GUI GUICtrlSetBkColor(-1, 0xffffff) $oIE.navigate(@ScriptDir & "\tree.gif") While True If _IsPressed("23", $hDLL) Then ExitLoop ; END key was pressed Sleep(50) WEnd $oIE = "" $hDLL = "" GUIDelete($hBackground) Thanks and happy holidays! xmas.au3 xmas.exe tree.ico Edited December 6, 2019 by JackER4565 Gianni and TheSaint 1 1 Link to comment Share on other sites More sharing options...
TheSaint Posted December 9, 2019 Share Posted December 9, 2019 Very nice ... Thanks for sharing. I had to recompile for 32 bit Win 7, which meant I needed to change #include <WinAPISysWin.au3> to #include <WinAPI.au3>. JackER4565 1 Make sure brain is in gear before opening mouth! Remember, what is not said, can be just as important as what is said. Spoiler What is the Secret Key? Life is like a Donut If I put effort into communication, I expect you to read properly & fully, or just not comment. Ignoring those who try to divert conversation with irrelevancies. If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it. I'm only big and bad, to those who have an over-active imagination. I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage) Link to comment Share on other sites More sharing options...
argumentum Posted December 10, 2019 Share Posted December 10, 2019 (edited) ..for some reason, the user "Fabrizio" is not in my PC Thanks for sharing Fabrizio Spoiler #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=tree.ico #AutoIt3Wrapper_AU3Check_Stop_OnWarning=y #AutoIt3Wrapper_Run_Tidy=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <WinAPISysWin.au3> #include <GUIConstants.au3> #include <Misc.au3>; For _IsPressed(23 END key) Global $hDLL = DllOpen("user32.dll"), $oIE = ObjCreate("Shell.Explorer.2") Global $hBackground = GUICreate("", 350, 470, 20, 20, $WS_POPUP, $WS_EX_LAYERED + $WS_EX_TOPMOST) Global $my_COLOR_WINDOW = _WinAPI_SwitchColor(_WinAPI_GetSysColor(5)) ; <----- this is important GUISetBkColor($my_COLOR_WINDOW) Global $AlphaKey = $my_COLOR_WINDOW $hLabel = GUICtrlCreateLabel("", 0, 0, 350, 450, -1, $GUI_WS_EX_PARENTDRAG) _WinAPI_SetLayeredWindowAttributes($hBackground, $AlphaKey, 0, $LWA_COLORKEY) GUISetState(@SW_SHOW, $hBackground) $hIE = GUICtrlCreateObj($oIE, -20, -5, 410, 480) ; <- embedd $oIE in the AutoIt GUI GUICtrlSetBkColor(-1, $my_COLOR_WINDOW) $oIE.navigate(@ScriptDir & "\tree.gif") While True If _IsPressed("23", $hDLL) Then ExitLoop ; END key was pressed Sleep(50) WEnd $oIE = "" $hDLL = "" GUIDelete($hBackground) Edited December 10, 2019 by argumentum fix bg color code JackER4565 1 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. 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