Sign in to follow this  
Followers 0
Mack

Background image

9 posts in this topic

#1 ·  Posted (edited)

This doesn't work :whistle:, i want to add a background image :">

#include <GUIConstants.au3>
GUICtrlCreateLabel ( "my label which will split on several lines", 10,20, 100, 100)
;GUICtrlSetStyle (-1, $SS_RIGHT )
GUICreate("My GUI" ,250,110 ,$WS_EX_WINDOWEDGE) ; will create a dialog box that when displayed is centered
GUISetState (@SW_SHOW)      ; will display an empty dialog box
GUICtrlSetImage ( "SGS.jpg" ,)
GUICtrlCreateButton ("& $GameOneName",  10, 10, 100)
GUICtrlCreateButton ("& $GameOneName",  10, 40, 100)
GUICtrlCreateButton ("& $GameOneName",  10, 70, 100)
GUICtrlCreateButton ("& $GameOneName",  10, 100, 100)
WinSetTrans ( "My GUI", "", 200)
; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend

GUICtrlSetImage ( "SGS.jpg" ,) gives an error

Edited by Mack

Share this post


Link to post
Share on other sites



GUICtrlSetImage ( "SGS.jpg" ,) gives an error

yes, because the syntax of your call is wrong: GUICtrlSetImage ( controlID, filename [, iconID [, icontype]] ) - see help file for an example.

Cheers

Kurt


__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

What do i need to fill in by ControlID? :S

Share this post


Link to post
Share on other sites

Do i need to fill in the GUI name or what?

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Do i need to fill in the GUI name or what?

<{POST_SNAPBACK}>

Could you to read this page? These details it's in the helpfile. -->this <--

- Look about the parameters.

- Look the example.

Edited by Josbe

Share this post


Link to post
Share on other sites

-1 doesn't work, i still dont get it :S

Share this post


Link to post
Share on other sites

-1 doesn't work, i still dont get it :S

<{POST_SNAPBACK}>

Of course, before, you need a GUICtrlCreatePic() function.

It's specified in the helpfile:

The control identifier (controlID) as returned by a GUICtrlCreate... function.

Check this thread

Share this post


Link to post
Share on other sites

Still don't get it , can't someone just fix my script

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

I take it the script is not yours? ie. You didn't build it from scratch and mostly just copied and cut other scripts to make it. I know this because if it was your own you would now how to use the functions correctly with there correct parameters.

#include <GUIConstants.au3>

GUICtrlCreateLabel ( "my label which will split on several lines", 10,20, 100, 100)
GUICreate("My GUI" ,250,110 ,$WS_EX_WINDOWEDGE)
GUICtrlCreatePic ("SGS.jpg", 0, 0, 250, 110)
GUICtrlSetState (-1, $GUI_DISABLE)

GUISetState (@SW_SHOW)

GUICtrlCreateButton ("& $GameOneName", 10, 10, 100)
GUICtrlCreateButton ("& $GameOneName", 10, 40, 100)
GUICtrlCreateButton ("& $GameOneName", 10, 70, 100)
GUICtrlCreateButton ("& $GameOneName", 10, 100, 100)

WinSetTrans ( "My GUI", "", 200)

; Run the GUI until the dialog is closed
While 1
   $Msg = GUIGetMsg()
   If $Msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend

You will find that if you bother to try something someone has suggested, such as reading the help file, people will respond more to your posts instead of ignoring them.

Edited by Burrup

[u]Old Projects:[/u]A3MORGB2Hex[u]Old Functions:[/u]_TimeAdd/_TimeSub_AddComma_BubbleSort _RippleSort "He who does not understand your silence will probably not understand your words." - Elbert Hubbard.

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