Kip Posted May 6, 2007 Posted May 6, 2007 (edited) I want to set an image for a button: expandcollapse popup#include <GUIConstants.au3> $Left = 300 $Top = 150 $Form1 = GUICreate("Menu", 639, 21, $Left, $Top) $MenuItem1 = GUICtrlCreateMenu("Bestand") $MenuItem5 = GUICtrlCreateMenuItem("MenuItem5", $MenuItem1) $MenuItem8 = GUICtrlCreateMenuItem("MenuItem8", $MenuItem1) $MenuItem7 = GUICtrlCreateMenuItem("MenuItem7", $MenuItem1) $MenuItem6 = GUICtrlCreateMenuItem("MenuItem6", $MenuItem1) $MenuItem2 = GUICtrlCreateMenu("Beeld") $MenuItem9 = GUICtrlCreateMenuItem("MenuItem9", $MenuItem2) $MenuItem3 = GUICtrlCreateMenu("Opties") $MenuItem10 = GUICtrlCreateMenuItem("MenuItem10", $MenuItem3) $MenuItem4 = GUICtrlCreateMenu("Help") $MenuItem11 = GUICtrlCreateMenuItem("MenuItem11", $MenuItem4) $MenuItem12 = GUICtrlCreateMenuItem("MenuItem12", $MenuItem4) GUISetState(@SW_SHOW) $Form2 = GUICreate("Speler", 639, 118+24, $Left, $Top+47, BitOr($WS_POPUP,$WS_BORDER)) GUICtrlCreatePic("IMG/Header.bmp",0,0,639,24) $Slider1 = GUICtrlCreateSlider(56, 64+24, 577, 25, BitOR($TBS_AUTOTICKS,$TBS_NOTICKS)) GUICtrlSetTip(-1, "Afspeelvoortgang") $Progress1 = GUICtrlCreateProgress(8, 8+24, 17, 105, BitOR($PBS_SMOOTH,$PBS_VERTICAL)) GUICtrlSetData(-1, 25) $Slider2 = GUICtrlCreateSlider(32, 8+24, 17, 105, BitOR($TBS_VERT,$TBS_AUTOTICKS,$TBS_TOP,$TBS_LEFT,$TBS_NOTICKS)) GUICtrlSetTip(-1, "Volume") $Label1 = GUICtrlCreateLabel("Titel", 64, 8+24, 144, 17) $Label2 = GUICtrlCreateLabel("Auteur", 64, 24+24, 139, 17) $Label3 = GUICtrlCreateLabel("Duur", 64, 40+24, 139, 17) $Button1 = GUICtrlCreateButton("Play", 64, 96+24, 100, 24, 0,$BS_BITMAP) GUICtrlSetImage(-1,"IMG\Play.bmp") ; <---<---<---<---<---<---<---<---<---<---<---<---<---<---Here<---<---<---<---<---<--- $Button2 = GUICtrlCreateButton("Stop", 152, 96+24, 81, 17, 0) $Button3 = GUICtrlCreateButton("Vorige", 240, 96+24, 81, 17, 0) $Button4 = GUICtrlCreateButton("Volgende", 328, 96+24, 81, 17, 0) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd That's the whole script, but it only shows an standard button, not an image Edited May 6, 2007 by kip MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API.
Kip Posted May 6, 2007 Author Posted May 6, 2007 Whoops! I forgot to remove: o, It's solved now. (why can't you remove your own topics?) MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API.
Valuater Posted May 6, 2007 Posted May 6, 2007 Not Correct $Button1 = GUICtrlCreateButton("Play", 64, 96+24, 100, 24, 0,$BS_BITMAP) Corrected $Button1 = GUICtrlCreateButton("Play", 64, 96+24, 100, 24, $BS_BITMAP) Its a Style, not an extended Style 8)
Kip Posted May 8, 2007 Author Posted May 8, 2007 Read my second reply MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now