CalibeR50 Posted October 14, 2012 Posted October 14, 2012 (edited) Hi, I searched for hours but didn't found a solution for my problem, I hope you can help me. I just need a GUI with some graphics (cirles or rects). The position and size doesn't matter. Now I first want to remove all graphics and create new ones (not the same quantity) on another position with other attributes. It can't be that hard, but I really didn't found anything, so please paste me a simple code and I'll understand. Thank you CalibeR50 PS: Sorry for my English, it's late... Edited October 14, 2012 by CalibeR50
PhoenixXL Posted October 15, 2012 Posted October 15, 2012 (edited) Look at _GDIPlus_GraphicsClear if working with alpha blend and WM_PAINT message to redraw the window Edit - Example #include <GDIPlus.au3> _GDIPlus_Startup() Global $Hgui=GUICreate('Testing | Phoenix XL',500,400) Global $nGfx=_GDIPlus_GraphicsCreateFromHWND($Hgui) GUIRegisterMsg(0xF,'Paint') GUISetState() While GUIGetMsg()<>-3 Sleep(10) WEnd _GDIPlus_GraphicsDispose($nGfx) _GDIPlus_Shutdown() GUIDelete() Func Paint() _GDIPlus_GraphicsDrawEllipse($nGfx,10,10,100,100) _GDIPlus_GraphicsDrawRect($nGfx,200,200,200,100) EndFunc Edited October 15, 2012 by PhoenixXL My code: PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners. MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.
PhoenixXL Posted October 15, 2012 Posted October 15, 2012 A similar example with in-built functions #include <GUIConstantsEx.au3> GUICreate('Testing | Phoenix XL',500,400) $hGfx1=GUICtrlCreateGraphic(20,20,110,110) GUICtrlSetGraphic(-1,$GUI_GR_RECT,0,0,90,90) $hGfx2=GUICtrlCreateGraphic(200,200,200-10,200-10) GUICtrlSetGraphic(-1,$GUI_GR_ELLIPSE,0,0,90,90) GUISetState() While GUIGetMsg()<>-3 Sleep(10) WEnd GUIDelete() My code: PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners. MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.
CalibeR50 Posted October 15, 2012 Author Posted October 15, 2012 Thanks for your reply. I dind't tested it yet, but there is no refresh in your examples. Can you give me an example of this? Or a link to a tutorial? I didn't found any information about drawing graphics in AutoIt
PhoenixXL Posted October 16, 2012 Posted October 16, 2012 In post 2 the func Paint is always called hence refreshed in post 3 the in-built controls handle redrawing and repainting internally My code: PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners. MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.
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