-
Apr 2nd, 2020, 10:00 AM
#1
Thread Starter
Fanatic Member
Themes, RGB Colors, and Impact on Forms / Controls
Since my upgrade to Win-10, I'm very disappointed with how my previously created VB6 apps look. I selected the Blue Window Theme (close to Classic as I could get), but things don't look like they use to.
Any suggestion on how best to rework Form and control colors associated with a selected Window Theme?
Another example of things I do not like is:
The title bar used to be a constant blue.
Now if the title bar receives focus it turns blue, otherwise it is white, the same as the menu area.
Last edited by vb6forever; Apr 2nd, 2020 at 10:07 AM.
-
Apr 2nd, 2020, 10:46 AM
#2
Re: Themes, RGB Colors, and Impact on Forms / Controls
This is going to sound a bit rough: Get used to it.
XP looked different than Wn95, Vista looked different than XP, Win10 looks different than the others. I don't think anyone that worked with Win10 the first time really loved its new style -- I didn't. But been working with it for a couple years and can barely remember what applications looked like before Win10
-
Apr 2nd, 2020, 11:51 AM
#3
Thread Starter
Fanatic Member
Re: Themes, RGB Colors, and Impact on Forms / Controls
LaVolpe (as always thank you for your input).
I guess what I'm trying to get at is the best way to change form control colors for an existing App to conform to the current Win-10 theme. Since I now assign various RGB (or hex) colors to controls and then run the App to see what they look like, I'm trying to figure out the best way to work within Theme colors (Hue, Saturation, and .... ) to adjust the correct control color within a theme.
If i got this correct the theme assigns the system colors which are now hidden except for a few.
My understanding is if we modify the system colors Win-10 will change them back to conform to the selected theme.
So, since VB6 uses RGB, these colors may be different than a comparable color based on Hue, Saturation, and ...). So somehow I need to
visually see what are those colors and their values (can write a convertor to go to RGB, hex) so I can change the control colors from what they are to the theme selected.
Last edited by vb6forever; Apr 2nd, 2020 at 11:56 AM.
-
Apr 2nd, 2020, 12:20 PM
#4
Re: Themes, RGB Colors, and Impact on Forms / Controls
vb6,
When you're in the "Personalize" area in Win10, if you click the "Custom Color" button (which is what I assume you're doing), and then click the "More" button ... you'll get an option to select your personalized color as either RGB or HSV. There's a direct translation between RGB and HSV (and vice-versa). They're just two different schemes for specifying (and possibly encoding) colors. Now, as far as I know, Windows has always used the RGB encoding scheme for actually storing any colors (although it now lets you specify colors in the HSV scheme).
If you wish to translate between RGB and HSV, there are translation algorithms around. If you google the following ...
"rgb" "hsv" site:vbforums.com
... 20 results return. If you don't find what you need, I've also got those algorithms and could re-post them.
Good Luck,
Elroy
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
-
Apr 2nd, 2020, 12:53 PM
#5
Fanatic Member
Re: Themes, RGB Colors, and Impact on Forms / Controls
VB6 doesn't just use RGB, but system colors as well. The 4th byte indicates whether it's RGB or system color. When you change any color property, you have two tabs: Palate(RGB), or System. The 4th byte is &H80 if it's a system color. If you want to know the current RGB value of a system color, you can call GetSysColor(), but usually it's not needed.
-
Apr 2nd, 2020, 01:25 PM
#6
Thread Starter
Fanatic Member
Re: Themes, RGB Colors, and Impact on Forms / Controls
Elroy / qvb6: Thanks for responding.
If you wish to translate between RGB and HSV, there are translation algorithms around.
Thanks I got them.
Where I think the problem is:
I assign one of the RGB standard colors, run the App, and because of the Theme set, the colors appear different (at least to me) than the color assigned. Could be my eyes. Have to play with it more.
----------
qvb6
---------
Know of GetSysColor. Thanks for other info as unaware of that.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|