Sign in to follow this  
Followers 0
ram4nd

Draw image

3 posts in this topic

How can I draw image on screen so it stays there and i can still do stuff in the active window.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

#include <GUIConstantsEx.au3> ;must
#include <StaticConstants.au3> ;must
#include <WindowsConstants.au3> ;must

Global $Form1 = GUICreate("My First Square", 600, 500) ;must

ShapeCreation() ;Calls the ShapeCreation function

GUISetState(@SW_SHOW)  ;must
While 1           ;must                  
    $nMsg = GUIGetMsg() ;must
    Switch $nMsg ;must
    Case $GUI_EVENT_CLOSE ;must
        Exit ;must

Func ShapeCreation()   ;The ShapeCreation function     


$Square = GUICtrlCreateGraphic(220, 250, 100, 100)
GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0xff00, 0xff00) ;The color of the shape
GUICtrlSetGraphic(-1, $GUI_GR_RECT, 50, 50, 80, 80) ;The shape of the it(Square) (x, y, width, length)


GUICtrlSetStyle(-1, $SS_NOTIFY) ;A must in order for images to show correctly
EndFunc


EndSwitch ;must
WEnd ;must

That lets you draw a green square, observe the code =p

Edited by BlazerV60

Share this post


Link to post
Share on other sites

Thank you for the example, i can continue editing it by myself.

Share this post


Link to post
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
Sign in to follow this  
Followers 0