Jump to content

Clear a graphic control


erifash
 Share

Recommended Posts

How can I clear a graphic control besides deleting it then creating a new one? I have a program that does that and there is a lot of flickering. :P Thanks!

Link to comment
Share on other sites

maybe this is what you mean?

#include <GUIConstants.au3>
GUICreate("My GUI picture",350,300,-1,-1,$WS_SIZEBOX+$WS_SYSMENU)  ; will create a dialog box that when displayed is centered

GUISetBkColor (0xE0FFFF)
$n=GUICtrlCreatePic(@Systemdir & "\oobe\images\mslogo.jpg",50,50, 200,50)

GUISetState ()
Sleep ( 1000 )
GUICtrlSetImage($n,"")
; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()
    
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend

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

Link to comment
Share on other sites

maybe?

#include <GUIConstants.au3>

GUICreate("My Draw")


$graphic = GUICtrlCreateGraphic(20, 50, 100, 100)
GUICtrlSetBkColor($graphic, 0xffffff)
GUICtrlSetColor($graphic, 0)

GUICtrlSetGraphic($graphic, $GUI_GR_COLOR, 0xff0000, 0xff0000)
GUICtrlSetGraphic($graphic, $GUI_GR_PIE, 50, 50, 40, 30, 270)
GUICtrlSetGraphic($graphic, $GUI_GR_COLOR, 0x00ff00, 0xffffff)
GUICtrlSetGraphic($graphic, $GUI_GR_PIE, 58, 50, 40, -60, 90)

GUISetState()
Sleep(3000)
GUICtrlSetGraphic($graphic, $GUI_GR_COLOR, 0xffffff, 0xffffff)
GUICtrlSetGraphic($graphic, $GUI_GR_RECT, 0, 0, 100, 100)
GUICtrlSetGraphic($graphic, $GUI_GR_REFRESH)

Do
    $msg = GUIGetMsg()
Until $msg = $GUI_EVENT_CLOSE

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...