typhoon Posted November 25, 2006 Share Posted November 25, 2006 When I use the Graphic control, nothing shows up unless I click off the window and then click back to it. Are manual refreshes necessary to make graphics show up while having the script gui on top? Link to comment Share on other sites More sharing options...
GaryFrost Posted November 25, 2006 Share Posted November 25, 2006 Supply a short script that can reproduce the problem, and we should be able to help resolve the problem. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Uten Posted November 25, 2006 Share Posted November 25, 2006 do a search for +dllcall+InvalidateRect* Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
typhoon Posted November 25, 2006 Author Share Posted November 25, 2006 $graphic = GUICtrlCreateGraphic(0, 0, 100, 100) GUICtrlSetBkColor($graphic, 0xffffff) while 1 ; main loop wend So, what happens is that I just want the background color to show up (to highlight the graphic box from the rest of the gray window). This doesn't happen when the script runs, only when I click off and then back onto the script gui. Link to comment Share on other sites More sharing options...
GaryFrost Posted November 25, 2006 Share Posted November 25, 2006 works for me with 3.2.0.1 and beta 3.2.1.13 #include <GUIConstants.au3> GUICreate('test', 150, 125) Opt("GUIOnEventMode", 1) GUISetOnEvent($GUI_EVENT_CLOSE, "ExitScript") $graphic = GUICtrlCreateGraphic(0, 0, 100, 100) GUICtrlSetBkColor($graphic, 0xffffff) GUISetState() While 1 Sleep(5000) WEnd Func ExitScript() Exit EndFunc SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
typhoon Posted November 25, 2006 Author Share Posted November 25, 2006 Huh. After playing around with it a bit, it seems like the problem was that I was showing the main GUI window before adding the Graphic control (adding it before showing the main window makes it ok, I guess because there is an implicit repaint). Strange though, because I also added Input controls after showing the main window and they show up without needing a manual refresh. Seems like this is varying from one control to another. Link to comment Share on other sites More sharing options...
typhoon Posted November 25, 2006 Author Share Posted November 25, 2006 (edited) Ok, well it seems that after drawing to the control (after showing the initial state), it still fails to refresh automatically unless the window is clicked off. I am drawing Pixels if that makes any difference. Edited November 25, 2006 by typhoon Link to comment Share on other sites More sharing options...
Uten Posted November 25, 2006 Share Posted November 25, 2006 $graphic = GUICtrlCreateGraphic(0, 0, 100, 100) GUICtrlSetBkColor($graphic, 0xffffff) while 1 ; main loop wend So, what happens is that I just want the background color to show up (to highlight the graphic box from the rest of the gray window). This doesn't happen when the script runs, only when I click off and then back onto the script gui. Ok, well it seems that after drawing to the control (after showing the initial state), it still fails to refresh automatically unless the window is clicked off. I am drawing Pixels if that makes any difference.I suppose you would have had an solution by now if you prepared your question a little bit with some working code. Just throwing out unprepared questions are futile. Wish you the best of luck with your code Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
Zedna Posted November 25, 2006 Share Posted November 25, 2006 Look at GUICtrlSetGraphic() & $GUI_GR_REFRESH in HelpFile Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
James Posted November 25, 2006 Share Posted November 25, 2006 Make it click on the desktop, then on the taskbar or just make it open the window. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
GaryFrost Posted November 25, 2006 Share Posted November 25, 2006 Make it click on the desktop, then on the taskbar or just make it open the window.Nonsense, no need to do something like that. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. 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