mendrofa Posted April 11, 2016 Share Posted April 11, 2016 how to set image in button #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> Example() Func Example() GUICreate("My GUI") ; will create a dialog box that when displayed is centered GUICtrlCreateButton("my picture button", 10, 20, 40, 40, @ScriptDir) GUICtrlSetImage(-1, @ScriptDir & "iklan.jpeg", 22) GUISetState(@SW_SHOW) ; Loop until the user exits. While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd EndFunc ;==>Example Link to comment Share on other sites More sharing options...
Developers Jos Posted April 11, 2016 Developers Share Posted April 11, 2016 From the helpfile: Quote Remarks To set or change information in the control see GUICtrlUpdate...() functions.A Button control can display an icon or image by using the $BS_ICON or $BS_BITMAP style. Use GUICtrlSetImage() to specify the picture to use. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
mendrofa Posted April 11, 2016 Author Share Posted April 11, 2016 thanks so much sir Link to comment Share on other sites More sharing options...
mendrofa Posted April 11, 2016 Author Share Posted April 11, 2016 how to set height and weight in that image sir ? 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