Jump to content

Flat button not working


biase
 Share

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))
GUISetBkColor(0x008A00)
GUICtrlCreateButton("Upload List", 0, 0, 150, 48, $BS_FLAT)
GUICtrlSetBkColor(-1, 0x00A600)
GUISetState()


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


Func _TaskBarHeight()
Local $aPos = WinGetPos("[CLASS:Shell_TrayWnd]")
Return $aPos[3]
EndFunc ;==>_TaskBarHeight
Link to comment
Share on other sites

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

https://www.google.com/search?q=free+button+graphic&hl=en&safe=off&source=lnms&tbm=isch&sa=X&ei=P2RkUdvgLoTMyQGWwYCYBQ&ved=0CAcQ_AUoAQ&biw=1280&bih=866

Edited by Mechaflash
Spoiler

“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.”

 

Link to comment
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))
GUICtrlSetState($passimg,$GUI_DISABLE)
$label = GUICtrlCreateLabel("text or empty:)",4,0,59,69)
GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT)
Edited by GideonM
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...