mattfaust Posted September 14, 2007 Share Posted September 14, 2007 can someone please show me how to use $bs_bitmap in a GUICtrlCreateButton command. Ive read the help file but I cant get it to work. basically i want a bitmap for my gui background, with bitmap buttons. thanks for any help Link to comment Share on other sites More sharing options...
Zedna Posted September 14, 2007 Share Posted September 14, 2007 GUICtrlSetImage() Post your code ... Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
mattfaust Posted September 15, 2007 Author Share Posted September 15, 2007 GUICtrlSetImage()Post your code ... well I really dont know I keep trying and deleting different approaches, what ive got now is#include <GUIConstants.au3>GUICreate("My GUI") ; will create a dialog box that when displayed is centeredGUICtrlCreateButton ("BTN1", 10,20,40,40, $BS_ICON)GUICtrlSetImage (, "BTN1.BMP",) GUISetState (); Run the GUI until the dialog is closedWhile 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoopWend Link to comment Share on other sites More sharing options...
maqleod Posted September 15, 2007 Share Posted September 15, 2007 well I really dont know I keep trying and deleting different approaches, what ive got now is #include <GUIConstants.au3> GUICreate("My GUI") ; will create a dialog box that when displayed is centered GUICtrlCreateButton ("BTN1", 10,20,40,40, $BS_ICON) GUICtrlSetImage (, "BTN1.BMP",) GUISetState () ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend #include <GUIConstants.au3> GUICreate("My GUI"); will create a dialog box that when displayed is centered $button1 = GUICtrlCreateButton ("BTN1", 10,20,40,40, $BS_ICON) GUICtrlSetImage ($button1,"BTN1.BMP") GUISetState () ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend [u]You can download my projects at:[/u] Pulsar Software Link to comment Share on other sites More sharing options...
therks Posted September 15, 2007 Share Posted September 15, 2007 (edited) *Edit: magleod beat me to it. I really need to refresh the page before I post a reply. *Edit2: Although he forgot to change $BS_ICON to $BS_BITMAP, so. Try this: $button = GUICtrlCreateButton ("BTN1", 10,20,40,40, $BS_BITMAP) GUICtrlSetImage ($button, "BTN1.BMP") Edited September 15, 2007 by Saunders My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
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