Jump to content

random background color


ashley
 Share

Recommended Posts

ok as the title says...

its a random background color changer...

just put this at the under your #inculdes

#include <GUIConstants.au3>

$Rcolor = Random( 0xFFFFFF, 0x2B1B1B1, 0)

#Region ### START Koda GUI section ### Form=
$GUI = GUICreate("random background color", 604, 111, 193, 115)
GUISetBkColor($Rcolor)
$test = GUICtrlCreateLabel("this is a test to show you how to make a random background color...", 40, 32, 546, 24)
GUICtrlSetFont(-1, 12, 800, 6, "MS Sans Serif")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

now save the script...

run it look at the background color...

close it

run it look at the background color

oh look it changed...

As i said i only did this because i got bored... but someone somewere might find it useful.

tell me what you think

Edited by ashley
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...