Jump to content

Recommended Posts

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
Posted

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 *

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

qq

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...