Jump to content
Sign in to follow this  

Flat button not working

Recommended Posts


Flast button return to normal after i set "GUISetBkColor(0x008A00)".

is this a bug or ... ?

#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>
#include <GuiButton.au3>

Global $sout = False, $MGWidth = @DesktopWidth, $MGHeight = (@DesktopHeight - _TaskBarHeight() + 2), $cmd, $CMDSStop = 0, $CMDSClear = 0, $iIndex = 0, $CMDHist[100]
$Main = GUICreate("BxPanel", $MGWidth, $MGHeight, @DesktopWidth - $MGWidth, -1, BitOR($WS_SYSMENU, $WS_POPUP), BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW))
GUICtrlCreateButton("Upload List", 0, 0, 150, 48, $BS_FLAT)
GUICtrlSetBkColor(-1, 0x00A600)

While 1
$gMsg = GUIGetMsg()
Switch $gMsg
Case -3

Func _TaskBarHeight()
Local $aPos = WinGetPos("[CLASS:Shell_TrayWnd]")
Return $aPos[3]
EndFunc ;==>_TaskBarHeight

Share this post

Link to post
Share on other sites

There was a thread on this subject. I think the developers basically said it was too much trouble to fix because they would have to go too deep into the core of the code.

RAID Calculator | Software Installer

The truth has been suppressed since the dawn of time.

Share this post

Link to post
Share on other sites

You can always utilize graphics for the buttons to make them prettier :)


Edited by Mechaflash


“Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.”


Share this post

Link to post
Share on other sites

Thanks for the info.

I think i go with image button until.

Share this post

Link to post
Share on other sites

I always like to go for label with picturebackground, then you can make te "button" really flat:)

$img = GUICtrlCreatePic($filenameofpicture,4,4,59,69,BitOR($SS_BITMAP,$SS_CENTERIMAGE))
$label = GUICtrlCreateLabel("text or empty:)",4,0,59,69)
Edited by GideonM

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