Sign in to follow this  
Followers 0
=sinister=

GuI Create help!

10 posts in this topic

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

Share this post


Link to post
Share on other sites



need these two at the top

#include <GUIConstants.au3>
Dim $n

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

it says there is an error reading GUIConstants..

Share this post


Link to post
Share on other sites

if you look in the folder

Program files >Autoit >include

you should see a file named GUIConstants.au3

if not there is an error somewhere.... maybe download Autoit again???

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

it already displays an image?????? (on mine)

maybe explain more??

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

not the background, like a bitmap on the screen.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

within this program you can create another gui and place an image on it..

thats not much of an explinatioon you gave

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

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.

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