Dark mode

Post Reply
User avatar
Jimmy
Posts: 165
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Dark mode

Post by Jimmy »

hi,

is there a FW Sample using "Dark Mode" :?:

Image
greeting,
Jimmy
User avatar
joseluisysturiz
Posts: 2024
Joined: Fri Jan 06, 2006 9:28 pm
Location: Guatire - Caracas - Venezuela
Contact:

Re: Dark mode

Post by joseluisysturiz »

Sakudos, aiempre he querodps hacer mis sistemas asi, pero no conseguido como, gracias... :shock:
Dios no está muerto...

Gracias a mi Dios ante todo!
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Dark mode

Post by Antonio Linares »

Jimmy,

If your app is going to use a RibbonBar here you have the source code to build a "dark" RibbonBar:

http://forums.fivetechsupport.com/viewt ... 83#p221683

Using these colors and applying them to your app you should get the desired "dark" app
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Jimmy
Posts: 165
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: Dark mode

Post by Jimmy »

hi,
joseluisysturiz wrote:Sakudos, aiempre he querodps hacer mis sistemas asi, pero no conseguido como, gracias... :shock:
when using Ownerdraw you can react on visual Style / Effekt and paint what you want.
Image
so the Question is does FW Controls support Ownerdraw :?:

---
do you remember Color under Windows XP ?
Image

Color of Apps depend on OS Theme which can be found in Registry under

Code: Select all

HKEY_CURRENT_USER\Control Panel\Colors
there are COLOR_ Constant to use it with GetSysColor() / SetSysColors() API

https://docs.microsoft.com/en-us/window ... etsyscolor
https://docs.microsoft.com/en-us/window ... tsyscolors

using SetSysColors() will change Color for all Apps :!: but only as long as User is login.
after re-login OS load default so Registry is not change :!:
greeting,
Jimmy
User avatar
Jimmy
Posts: 165
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: Dark mode

Post by Jimmy »

hi,

i found this working Code
http://forums.fivetechsupport.com/viewt ... ORS#p91694

Code: Select all

nRet := clrtest( CLR_YELLOW, CLR_HRED )

HB_FUNC( CLRTEST )
{
   int aElements[2] = { COLOR_CAPTIONTEXT, COLOR_SCROLLBAR };
   DWORD aColors[2];

   aColors[ 0 ] = hb_parnl( 1 );
   aColors[ 1 ] = hb_parnl( 2 );
   hb_retl (SetSysColors( 2, aElements, aColors ));
}
now i try this code with modify Function and it work

Code: Select all

nRet := SETSYSCOLORSEX({COLOR_SCROLLBAR}, CLR_HMAGENTA)
nRet := SETSYSCOLORSEX({COLOR_CAPTIONTEXT},CLR_HBLUE)

HB_FUNC( SETSYSCOLORSEX )
{
   int aElements[1];
   DWORD aColors[1];

   aElements[ 0 ] = hb_parnl( 1 );
   aColors[ 0 ]   = hb_parnl( 2 );
   hb_retl (SetSysColors( 1, aElements, aColors ));
}
 
but this function have only 2 Parameter and it start with Array.
what i like to have are 3 Parameter where 2nd and 3rd are test for "VALTYPE" = "C" or "A"

who can help me to write a new SETSYSCOLORSEX :?:

p.s. not sure if Answer is like this Thread http://forums.fivetechsupport.com/viewt ... 6&p=159545
greeting,
Jimmy
Post Reply