Jump to content

Recommended Posts

Posted

I need some help. I found this on another post and it says there is a variable used without being declared! I can't figure out what the problem is! Please help!

GuiCreate("Control Panel", 348, 223, 366,266)
$n = GUICtrlCreatePic(@Systemdir & "\oobe\images\wpakey.jpg",0,0, 366,266)
GuiCtrlSetState($n, $GUI_DISABLE)
$Button1 = GuiCtrlCreateButton("About", 80, 72, 57, 33)
$Button2 = GuiCtrlCreateButton("Stop", 200, 72, 57, 33)
$Button3 = GuiCtrlCreateButton("Start", 200, 112, 57, 33)

GuiSetState()
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case $msg = $Button1;Channel Button
        MsgBox (0, "About", "Version 1.1")
    Case $msg = $Button2;Stop Button
        Terminate()
    Case $msg = $Button3;Start Button
    ;Func goes here
    Case Else
;;;
    EndSelect
WEnd
Exit


;Terminate
Func Terminate()
    Exit 0
EndFunc
Posted

thanks it works, one more ?. Is there a way I can show a image on this program using GUI Create?

Right under $Button3 use GUICtrlCreatePic.
Posted

yup, got it! Heres the code:

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

Might wanna change the x y position and the image.

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
  • Recently Browsing   0 members

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