ratakantez Posted March 15, 2022 Share Posted March 15, 2022 (edited) Hi, I want to use animated link on my gui by using _IECreateEmbedded, but my background has white place even if i change the background color.. Is there any way to change or clear off the white color from my gui screen. #Include <IE.au3> $sGIF = "https://user-images.githubusercontent.com/14011726/94132137-7d4fc100-fe7c-11ea-8512-69f90cb65e48.gif" $hGui = GUICreate("Test", 750, 550) $oIE = _IECreateEmbedded() GUICtrlCreateObj($oIE, 50, 50, 340, 345) _IENavigate($oIE, $sGIF) GUISetState() ;~ $oIE.navigate("about:blank") (I tried with this but i couldnt find a way) $oIE.document.body.style.border="0" $oIE.document.write("<body style='background-color:grey'></body>") ; (I tried with this but i couldnt find a way) $oIE.document.write("<body style='border:0;margin:0px'><iframe scrolling=no frameborder=0 src =" & $sGIF & " width=100% height=100%></iframe></body>") ;~ $oIE.style.backgroundColor = 0; (I tried with this but i couldnt find a way) $oIE.refresh $oIE.document.body.scroll = "no" Do Sleep(20) Until GUIGetMsg() = -3 Edited March 15, 2022 by ratakantez Link to comment Share on other sites More sharing options...
Solution Subz Posted March 15, 2022 Solution Share Posted March 15, 2022 Why not just use <a> tag + <img> tag for example: $oIE.document.write('<body style="margin:0;border:none"><a href="https://www.autoitscript.com/" target="_blank"><img width="100%" height="100%" src="' & $sGIF & '" alt="AutoIt" style="border:none"></a></body>') The issue is that you're trying to display the image within iframe, the iframe is outside the scope of your pages css, if you open the image in a browser you'll notice that it's rendered with margin + border. ratakantez 1 Link to comment Share on other sites More sharing options...
ratakantez Posted March 15, 2022 Author Share Posted March 15, 2022 4 hours ago, Subz said: Why not just use <a> tag + <img> tag for example: $oIE.document.write('<body style="margin:0;border:none"><a href="https://www.autoitscript.com/" target="_blank"><img width="100%" height="100%" src="' & $sGIF & '" alt="AutoIt" style="border:none"></a></body>') The issue is that you're trying to display the image within iframe, the iframe is outside the scope of your pages css, if you open the image in a browser you'll notice that it's rendered with margin + border. yes you are right. probably my queastion was so stupid 😐 because i am realy new at coding.. and i dont know HTML enough. Thanks for your advice. It works perfect 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