Jump to content

button setting image and background


gcue
 Share

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)
 
GUISetBkColor(0x000FFF)
 
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")
 
GUISetState()
 
While 1
Sleep(10)
WEnd
 
Func _Exit()
Exit
EndFunc   ;==>_Exit
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...