Jump to content

Recommended Posts

Posted (edited)

Okay here we go again..

Func Surface_Create($BackgroundColor)
    $SurfaceGUI = GUICreate("SurfaceGUI", 700, 700)
    Global $SurfaceColor = $BackgroundColor
    Return GUICtrlCreateGraphic(0, 0, 700, 700)
EndFunc

Im Trying to Return GUICtrlCreateGraphic(0, 0, 700, 700) and set the Background Color of it to $Background Color. How would i do this WITHIN the function, while still ONLY returning the CONTROL ID??

nvm again.. i got it:

Func Surface_Create($BackgroundColor)
    $SurfaceGUI = GUICreate("SurfaceGUI", 700, 700)
    Global $SurfaceColor = $BackgroundColor
    Dim $Array[2]
    $Array[0] = GUICtrlCreateGraphic(0, 0, 700, 700)
    $Array[1] = GUICtrlSetBkColor(-1, $BackgroundColor)
    Return $Array[0]
EndFunc
Edited by CHRIS95219

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
×
×
  • Create New...