mirko-stifler Posted June 7, 2016 Share Posted June 7, 2016 (edited) Hello guys, I'm an Italian student! Sorry for my English I have the need to create more graphic objects one after the other; especially when it appears a graphic object disappears the last. I had several problems and I can not solve them. Const $iWidth = @DesktopWidth+4, $iHeight = @DesktopHeight, $iBgColor = 0x303030 ;$iBgColor formato RRGGBB Local $Coord[4] = [800, 583, 820, 600] ; Pairs of coordinates x,y _GDIPlus_Startup() ; Inizialize GDI+ $hGUI = GUICreate("GDI+ Example (" & @ScriptName & ")", $iWidth, $iHeight) ;create a test GUI GUISetBkColor($iBgColor, $hGUI) ;set color background GUI GUISetState(@SW_SHOW) $Numero = 0 Do InizioRect( $Numero, $Coord) $Numero = $Numero + 2 Until $Numero > 3 Edited June 8, 2016 by mirko-stifler Link to comment Share on other sites More sharing options...
mirko-stifler Posted June 7, 2016 Author Share Posted June 7, 2016 Hello guys, I'm an Italian student! Sorry for my English I have the need to create more graphic objects one after the other; especially when it appears a graphic object disappears the last. I had several problems and I can not solve them. Const $iWidth = @DesktopWidth+4, $iHeight = @DesktopHeight, $iBgColor = 0x303030 ;$iBgColor formato RRGGBB Local $Coord[4] = [800, 583, 820, 600] ; Pairs of coordinates x,y _GDIPlus_Startup() ; Inizialize GDI+ $hGUI = GUICreate("GDI+ Example (" & @ScriptName & ")", $iWidth, $iHeight) ;create a test GUI GUISetBkColor($iBgColor, $hGUI) ;set color background GUI GUISetState(@SW_SHOW) $Numero = 0 Do InizioRect( $Numero, $Coord) $Numero = $Numero + 2 Until $Numero > 3 Link to comment Share on other sites More sharing options...
mirko-stifler Posted June 7, 2016 Author Share Posted June 7, 2016 Hello guys, I'm an Italian student! Sorry for my English I have the need to create more graphic objects one after the other; especially when it appears a graphic object disappears the last. I had several problems and I can not solve them. Const $iWidth = @DesktopWidth+4, $iHeight = @DesktopHeight, $iBgColor = 0x303030 ;$iBgColor formato RRGGBB Local $Coord[4] = [800, 583, 820, 600] ; Pairs of coordinates x,y _GDIPlus_Startup() ; Inizialize GDI+ $hGUI = GUICreate("GDI+ Example (" & @ScriptName & ")", $iWidth, $iHeight) ;create a test GUI GUISetBkColor($iBgColor, $hGUI) ;set color background GUI GUISetState(@SW_SHOW) $Numero = 0 Do InizioRect( $Numero, $Coord) ; a function $Numero = $Numero + 2 Until $Numero > 3 Func InizioRect(ByRef $Numero, ByRef $Coord) $hGraphics = _GDIPlus_GraphicsCreateFromHWND($hGUI) ;object graphics _GDIPlus_GraphicsSetSmoothingMode($hGraphics, $GDIP_SMOOTHINGMODE_HIGHQUALITY) ; (antialiasing) $hPen = _GDIPlus_PenCreate(0xFFFEDCBA, 4) ;colore formato AARRGGBB (hex) Sleep(1000) _GDIPlus_GraphicsDrawRect($hGraphics, $Coord[$Numero], $Coord[$Numero+1], 200, 100, $hPen) Sleep (5000) EndFunc So to avoid that the figures are present both, making only appear as the current one can do? Thank you all Link to comment Share on other sites More sharing options...
Danyfirex Posted June 7, 2016 Share Posted June 7, 2016 Hello. Use _GDIPlus_GraphicsClear Saludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted June 7, 2016 Moderators Share Posted June 7, 2016 @mirko-stifler Stick to one topic please "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! 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