Jump to content
Sign in to follow this  

button setting image and background

Recommended Posts


hello world =)

if we set an image to a button we cannot set a background?  basically i am trying to set the button background to match the color of the gui but also include an image as part of the button.

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Opt("GUIOnEventMode", 1)
GUICreate("test", 240, 100)
GUICtrlCreateButton("", 80, 25, 32, 32, $BS_ICON)
GUICtrlSetBkColor(-1, 0x000FFF)
GUICtrlSetImage(-1, "shell32.dll", 142, 0)
GUICtrlCreateButton("", 120, 25, 32, 32, $BS_ICON)
GUICtrlSetImage(-1, "shell32.dll", 142, 0)
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
While 1
Func _Exit()
EndFunc   ;==>_Exit

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