Madza91 Posted December 21, 2008 Share Posted December 21, 2008 Hello, is possible to get Window's default color of some control's edge (for ex. color of Edit's edge) ?! [quote name='dbzfanatic' post='609696' date='Nov 26 2008, 08:46 AM']This is a help forum not a "write this for me" forum.[/quote](Sorry for bad English) :) Link to comment Share on other sites More sharing options...
Andreik Posted December 21, 2008 Share Posted December 21, 2008 Hello, is possible to get Window's default color of some control's edge (for ex. color of Edit's edge) ?! Something like this (very ugly, but work): $GUI = GUICreate("EXAMPLE",200,200,-1,-1) $EDIT = GUICtrlCreateEdit("TEST",5,5,190,190) GUISetState() While 1 $MSG = GUIGetMsg() If $MSG = -3 Then Exit EndIf $POS = ControlGetPos("EXAMPLE","",$EDIT) TrayTip("CONTROL EDGE COLOR",Hex(PixelGetColor($POS[0],$POS[1],$GUI),6),1) Sleep(30) WEnd When the words fail... music speaks. Link to comment Share on other sites More sharing options...
Andreik Posted December 21, 2008 Share Posted December 21, 2008 Or maybe with _WinAPI_GetSysColor(). When the words fail... music speaks. Link to comment Share on other sites More sharing options...
Madza91 Posted December 21, 2008 Author Share Posted December 21, 2008 (edited) Maybe, but with what $iIndex? I tried almost whole $iIndex's from Help file, and I'm not founded right one ;0 Edited December 21, 2008 by n3nE [quote name='dbzfanatic' post='609696' date='Nov 26 2008, 08:46 AM']This is a help forum not a "write this for me" forum.[/quote](Sorry for bad English) :) Link to comment Share on other sites More sharing options...
rasim Posted December 22, 2008 Share Posted December 22, 2008 Maybe, but with what $iIndex? I tried almost whole $iIndex's from Help file, and I'm not founded right one ;0Example: #include <GUIConstantsEx.au3> #include <WinAPI.au3> #include <WindowsConstants.au3> GUICreate("My GUI", 200, 100) GUISetBkColor(0xFFFFFF) $BGR = _WinAPI_GetSysColor($COLOR_ACTIVEBORDER) ;Get the active border color GUICtrlCreateLabel("", 50, 35, 100, 20) GUICtrlSetBkColor(-1, _RGB2BGR($BGR)) ;Set gived color to a label control GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd Func _RGB2BGR($iColor) Return BitAND(BitShift(String(Binary($iColor)), 8), 0xFFFFFF) EndFunc ;==>_RGB2BGR() 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