thetwistedpanda Posted June 3, 2007 Share Posted June 3, 2007 (edited) I've been running into a little annoying problem since I started working on a client for a java web game. Whenever my window looses focus to any object (whether it be a window, message box, or simply minimizing the program), it produces a rather ugly white blotch which doesn't go away willingly. Here's a slice of code to reproduce the problem I get using an embedded IE window: #include <GUIConstants.au3> #include <IE.au3> $GUI_Parent = GUICreate("Annoyance", 454, 344, Default, Default) $Parent_IE = ObjCreate("Shell.Explorer.2") $Parent_ActiveX = GUICtrlCreateObj($Parent_IE, 5, 5, 444, 334) _IENavigate($Parent_IE, "http://wild.fiends.com/DCourt/Game.stm") $oApplet = _IETagNameGetCollection($Parent_IE, "applet", 0) $oApplet.scrollIntoView () $Parent_IE.document.body.scroll = "no" GUISetstate() MsgBox(0, "Making The Uglyness", "Close Me (Not a 100% Chance of Reproducing)") While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then Exit WEnd I've been using $WS_EX_TOPMOST on the GUI with the embedded window to prevent other windows from stealing focus, and WinSetOnTop ($GUI, "", 0) / WinSetOnTop ($GUI, "", 1) when I want to use a message box, but both of these methods are rather unsatisfactory... Other parts of the gui (such as the menu) still produce the ugly blotches. Is there an easy way to refresh the applet without having to reload the web page (or dragging the GUI offscreen)? Edited June 5, 2007 by thetwistedpanda Link to comment Share on other sites More sharing options...
thetwistedpanda Posted June 4, 2007 Author Share Posted June 4, 2007 Sooo, does anyone have any ideas? I'm pretty sure that I won't be able to fix this problem (I whipped up several other examples using different applets and none of them seemed to have the problem), but perhaps there's a nifty IE code that'll help. Link to comment Share on other sites More sharing options...
ResNullius Posted June 4, 2007 Share Posted June 4, 2007 (edited) Try adding this GUICtrlSetGraphic ($Parent_ActiveX, $GUI_GR_REFRESH) after your message box EDIT: NEVER MIND... I'm sure I tried that and it worked, but I just tried again after posting and it doesn't... grrrrrrr Don't know if it's of any use but "history.go(0)" is supposed to repaint a page in javascript without reloading the page Edited June 4, 2007 by ResNullius Link to comment Share on other sites More sharing options...
thetwistedpanda Posted June 4, 2007 Author Share Posted June 4, 2007 Thanks for trying. The annoying white spaces don't pop up 100% of the time; it seems to depend on what you were doing at the time... Link to comment Share on other sites More sharing options...
thetwistedpanda Posted June 5, 2007 Author Share Posted June 5, 2007 *Bumpie* Link to comment Share on other sites More sharing options...
ResNullius Posted June 6, 2007 Share Posted June 6, 2007 Seems that this is a related problem http://www.autoitscript.com/forum/index.ph...06&hl=childDragging the Gui off the screen and back will repaint it too. But no solution there either... Link to comment Share on other sites More sharing options...
ReFran Posted June 6, 2007 Share Posted June 6, 2007 Yea, I think it's a common problem if you work with a GUI with embeded objects. To redraw you can use somethink like: WinSetTrans ("Test Webbrowser", "", 255) WinSetTrans ("Test Webbrowser", "", 255) It may be in your while loop and executed if WinList() has changed. HTH, Reinhard Link to comment Share on other sites More sharing options...
thetwistedpanda Posted June 6, 2007 Author Share Posted June 6, 2007 Yea, I think it's a common problem if you work with a GUI with embeded objects.To redraw you can use somethink like:WinSetTrans ("Test Webbrowser", "", 255)WinSetTrans ("Test Webbrowser", "", 255)It may be in your while loop and executed if WinList() has changed.HTH, ReinhardThat method doesn't seem to work with the java applet. Instead of repainting it, it paints the entire applet white >.>. I managed to get around the problem by simply preventing anything and everything from getting in the way of the applet, since I don't know of a way to implement the history.go(0) into autoit haha. 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