-
Aug 20th, 2020, 10:50 PM
#1
Windows 10 Look?
I haven't been programming for money for a while now, but in the past two years I've gotten several requests from old customers to update the look of old programs. It seems they've finally left older unsupported Windows versions behind, because these requests are increasing.
Most of them are pretty happy with simple changes: changing controls from 3D to Flat, changing splitter bars to 1-pixel width, getting rid of fat spaces between things like TextBoxes, eliminating all use of SSTab and other antique controls. Updating old toolbar icons with "flatter" images with less detail and no gradients or shadows.
Proper functioning in "High Contrast Mode" for low vision is required, so I can only get just so sloppy about things like user-drawn controls and carnival colors I see others here using. Strictly system colors taken from current settings.
MDI is more of a challenge, but so far no requests on those. I never wrote very many of them anyway.
What am I overlooking? Are there other things to worry about?
Maybe we can compile a list of "tweaks" to help get away from the Chicago, Luna, and Aero looks of the distant past.
-
Aug 20th, 2020, 11:57 PM
#2
New Member
Re: Windows 10 Look?
I think the font used might have the largest impact. Without starting a font war, maybe finding out a recommended font would help?
Best
-
Aug 21st, 2020, 12:35 AM
#3
Re: Windows 10 Look?
I have adapted our softwares to W10 look (as much as possible) log time ago
I use Sergoe UI Font, Codejock product, and I have all my own controls to have as much as possible W10 look
But I still use MDI app
-
Aug 21st, 2020, 01:20 AM
#4
Re: Windows 10 Look?
As far as fonts go, Segoe UI and Consolas (for monospaced text) have been the standard since Vista arrived in 2006. I still usually fetch the font via:
SystemParametersInfo(SPI_GETNONCLIENTMETRICS,...)
so I can match the user's system font settings.
-
Aug 21st, 2020, 02:09 AM
#5
Re: Windows 10 Look?
We follow more or less the UI of the Office applications, because that's what our customer are most used to.
Office look and feel is not always in line with Windows itself.
-
Aug 21st, 2020, 09:48 AM
#6
Hyperactive Member
Re: Windows 10 Look?
I recently released an update to one of my products and UI update was a major part of the project. I changed icons to more of a flat look using Axialis Icon Generator for icon creation. The default font is now Segoe UI on all forms/controls. Replaced VB6 intrinsic controls with VBCCR versions. Most control borders are flat (rather than 3D). For colors and layout ideas I copied Outlook and some other applications whose look I liked.
-
Aug 21st, 2020, 11:29 AM
#7
Re: Windows 10 Look?
There are some subtle things we could talk about. For instance, yes, buttons are now flat, but they also no longer offset the text by a pixel when clicked. Furthermore, the border and backcolor change when you hover over them and click on them.
Notice these things on the following movie:
And textboxes also have different effects. When they're selected, the borders change colors. Here's a picture of three textboxes. The last one has the focus:
And comboboxes do a combination of things (similar to the button and the textbox). Here's a video. I'll let you study the subtle effects.
I captured the screenshot and videos using a little program called G*Power. However, I looked at other, completely unrelated, programs, and they all have these effects (e.g., Notepad++, Cisco VPN).
If we really want to implement the Win10 look in VB6, we probably need to cover all these basis with some new User Controls.
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.
-
Aug 21st, 2020, 11:38 AM
#8
Re: Windows 10 Look?
I wrote my own control (including picture) to do it
-
Aug 21st, 2020, 12:40 PM
#9
Re: Windows 10 Look?
Isn't this issue about manifesting to get common controls themed and initializing the CC on the program?
If you use Common Controls version 5 they will be themed, but you already know that.
The PictureBox and RichTextBox are not themed, but you can the set their Appearance to vbFlat. The same with other controls like the flex grids. (*)
The rest is to use flatter icons, newer fonts... and of course, there are many things that can be done to improve the UI.
Edit:
Also a little bigger icons.
And about to handle high contrast themes, if the controls used system colors they will do that automatically.
(*) Or move to Krool's Common Controls. Then you'll be more ready to add Unicode support also.
Last edited by Eduardo-; Aug 21st, 2020 at 12:51 PM.
-
Aug 21st, 2020, 01:37 PM
#10
Re: Windows 10 Look?
Yes, selecting CC6 via a manifest does a lot to help.
Most of the things still in my programs they complained about were "fat" things like splitter bars and space between adjacent TextBox, RichTextBox, etc. controls as well as the 3-D borders on such controls.
-
Aug 21st, 2020, 07:08 PM
#11
Fanatic Member
Re: Windows 10 Look?
We should test our old VB6 program with PerMonitorV2 in manifest on dual High Dpi monitors to see what is happening before customers compalaining.
-
Aug 24th, 2020, 10:45 AM
#12
Hyperactive Member
Re: Windows 10 Look?
On the same topic, is there a "modern" way to style the tab control? Those can easily add lots of excess borders.
-
Aug 24th, 2020, 04:22 PM
#13
Re: Windows 10 Look?
SSTab was deprecated long ago as a Win3.x look legacy control.
TabStrip has better support since it wraps a Common Control:
Or for the old folks at home old-timey Aero:
-
Aug 25th, 2020, 07:04 AM
#14
Fanatic Member
Re: Windows 10 Look?
How do you change to modern fonts for all controls on a form?
Attached is a screen shot (normal and zoomed) of top left corner of a compiled manifested VB form on Windows10
The Menu font is anti-aliased, the Frame frame font is not.
-
Aug 25th, 2020, 07:12 AM
#15
Re: Windows 10 Look?
I suppose it's the most work, but migrating to a more modern programming environment could work miracles... The other suggestions are good and I have nothing else to add. :-)
Last edited by Peter Swinkels; Aug 25th, 2020 at 10:44 AM.
Reason: typo
-
Aug 25th, 2020, 09:08 AM
#16
Re: Windows 10 Look?
Originally Posted by mms_
How do you change to modern fonts for all controls on a form?
Well, one idea: FontWiz: The Missing Piece in Styling Your Programs
Sadly the screenshots there have been blurred by the Forum, but run the demo to see.
-
Aug 25th, 2020, 09:57 AM
#17
Re: Windows 10 Look?
Originally Posted by dilettante
As far as fonts go, Segoe UI and Consolas (for monospaced text) have been the standard since Vista arrived in 2006. I still usually fetch the font via:
SystemParametersInfo(SPI_GETNONCLIENTMETRICS,...)
so I can match the user's system font settings.
The issue with that is that none of the fonts returned with this is the one actually used in dialogs and Windows programs in general.
The MessageBox font that seems the one that should be, in my case is much bigger than the ones used by Windows (Ok, I have it enlarged by a manual tweak, because Windows 10 no longer allows to change them).
IMO Windows probably uses a fixed font size or it is on another setting.
-
Aug 25th, 2020, 10:31 AM
#18
Fanatic Member
-
Aug 25th, 2020, 07:55 PM
#19
Fanatic Member
-
Sep 3rd, 2020, 05:02 PM
#20
Addicted Member
Re: Windows 10 Look?
is there a way to get flat combobox?
-
Sep 3rd, 2020, 05:26 PM
#21
Re: Windows 10 Look?
Common Controls 6 gets me this:
How much "flatter" are you looking for?
-
Sep 3rd, 2020, 07:08 PM
#22
Addicted Member
Re: Windows 10 Look?
my CC6 doesn't show flat when selected. is something not configured correctly?
-
Sep 3rd, 2020, 08:18 PM
#23
Re: Windows 10 Look?
my CC6 doesn't show flat when selected. is something not configured correctly?
To remove any confusion:
- CC6 = common controls v6 stated within a manifest, not v6 of the common controls in VB's toolbox
- in IDE, the IDE must be manifested to show themed controls
- when exe is compiled, manifest must be used to show themed controls
- not that it applies here, but use v5 of the common controls in your toolbox if they should be themed
-
Sep 3rd, 2020, 08:56 PM
#24
Addicted Member
Re: Windows 10 Look?
Originally Posted by LaVolpe
To remove any confusion:
- CC6 = common controls v6 stated within a manifest, not v6 of the common controls in VB's toolbox
- in IDE, the IDE must be manifested to show themed controls
- when exe is compiled, manifest must be used to show themed controls
- not that it applies here, but use v5 of the common controls in your toolbox if they should be themed
Thanks for helping me start to understand. it's confusing. so in IDE, is the control (combobox) still going to only show as 3D even if coded as flat? but in manifested exe, it will show flat? is this same for all OS's? guess i'm going to have to learn more about manifest.
-
Sep 3rd, 2020, 09:10 PM
#25
Re: Windows 10 Look?
Originally Posted by LaVolpe
- in IDE, the IDE must be manifested to show themed controls
That turns out not to be the case. For example within Sub Main your program can dynamically apply a separate Activation Context from an arbitrary manifest file or resource, then remove it before exiting out of run mode. That works fine for IDE runs.
Of course it can be brittle, just like subclassing in IDE runs. And it's more work, so why do it that way?
But you can. Off topic though.
Setting that aside, the key is to select the "Microsoft.Windows.Common-Controls" version 6 assembly, instead of the default legacy version 5. That assembly contains a lot more than just the modern version of COMCTL32.DLL. It also contains updated DLLs for the standard set of Win32 Controls (BUTTON, EDIT, SCROLLBAR, COMBOBOX, etc.).
Assembly selection is done through the Activation Context, which is specified in an Application Manifest.
As you can see, this is pretty old-hat stuff. We had the documentation for it as early as 2001.
-
Sep 3rd, 2020, 09:15 PM
#26
Re: Windows 10 Look?
Originally Posted by dilettante
That turns out not to be the case.
I know. I just didn't want to get into the disclaimers and other workarounds. If ppl are having problems getting simple controls showing up themed, those other options likely to add more confusion.
Regardless, point taken & I probably shouldn't have use the word "must" anywhere in that reply of mine; because "must" is wrong & a better word maybe should've been "should"? Rhetorical.
-
Sep 3rd, 2020, 10:12 PM
#27
Re: Windows 10 Look?
I got sidetracked because of another recent thread on the ActCtx API.
When it became apparent that "CC6" is too vague a description I tried to find something concise that describes selecting the version 6 assembly and the effects that has. At this late date though it is hard to find writeups friendly to VB programmers.
COMCTL32.OCX is a thin ActiveX wrapper calling the system COMCTL32.DLL
MSCOMCTL.OCX is a fat copy of Win95 COMCTL32.DLL with similar wrapper logic and some extensions added. I believe it was statically linked to the old COMCTL32.LIB file, but it may have been compiled as one big blob to make the hacking easier. I think it was meant as a way to modernize this set of controls, but got abandoned as a dead-end.
By default COMCTL32.OCX and the VB6 intrinsic controls call the legacy COMCTL32.DLL version 5 assembly supplied for appcompat in Windows. By selecting the version 6 assembly the newer Windows libraries are used instead. This includes several newer controls we have no VB6 wrappers for, as well as new functionality for the older controls which is not directly exposed to VB6 (new ListView views, etc.).
MSCOMCTL.OCX is stuck, cast in stone, simulating the look and feel of Windows 95.
-
Sep 4th, 2020, 03:36 AM
#28
Re: Windows 10 Look?
Originally Posted by dilettante
For example within Sub Main your program can dynamically apply a separate Activation Context from an arbitrary manifest file or resource, then remove it before exiting out of run mode. That works fine for IDE runs.
Then that sounds like the manifest can be built on the fly. Not sure if it really needs to be loaded from a file or resource or it just can be a string generated/stored in the program.
Even if it is required to be a file, the file might be temporary file that the same procedure creates in the temp folder.
-
Sep 4th, 2020, 08:52 AM
#29
Addicted Member
Re: Windows 10 Look?
Appreciate your guys helping...i have to admit though, i'm struggling with my understanding...
Originally Posted by LaVolpe
- CC6 = common controls v6 stated within a manifest, not v6 of the common controls in VB's toolbox
- in IDE, the IDE must be manifested to show themed controls
- when exe is compiled, manifest must be used to show themed controls
- not that it applies here, but use v5 of the common controls in your toolbox if they should be themed
Originally Posted by dilettante
Setting that aside, the key is to select the "Microsoft.Windows.Common-Controls" version 6 assembly, instead of the default legacy version 5. That assembly contains a lot more than just the modern version of COMCTL32.DLL.
Assembly selection is done through the Activation Context, which is specified in an Application Manifest.
Originally Posted by dilettante
By default COMCTL32.OCX and the VB6 intrinsic controls call the legacy COMCTL32.DLL version 5 assembly supplied for appcompat in Windows. By selecting the version 6 assembly the newer Windows libraries are used instead. This includes several newer controls we have no VB6 wrappers for, as well as new functionality for the older controls which is not directly exposed to VB6 (new ListView views, etc.).
To get the 'flat' combobox, etc, do i need to include "Microsoft Windows Common Controls V6" (mscomctl.ocx) or "Microsoft Windows Common Controls" version 5 (comctl32.ocx) or both?
i've used LaVolpe's 'Manifest Creator' to add the .res file with manifest as suggested, and the .exe seems to work fine to show the V6 features (such as flat combobox). how do i get the IDE to show the V6 features?
-
Sep 4th, 2020, 09:10 AM
#30
Re: Windows 10 Look?
Originally Posted by Jimboat
To get the 'flat' combobox, etc, do i need to include "Microsoft Windows Common Controls V6" (mscomctl.ocx) or "Microsoft Windows Common Controls" version 5 (comctl32.ocx) or both?
Neither one. Those OCXs do not have anything to do with ComboBox controls.
Don't confuse those OCXs with the Windows controls assembly versions.
Assemblies are packages of one or more DLLs. The DLL that provides the ComboBox may not be COMCTL32.DLL, but it is part of the same assembly as COMCTL32.DLL.
The version numbers given to the "Microsoft Windows Common Controls" OCXs just happen to have values 5 and 6, but they are not the same 5 and 6 at all. The similar numbering is just an unfortunate accident.
-
Sep 4th, 2020, 09:14 AM
#31
Addicted Member
Re: Windows 10 Look?
Originally Posted by dilettante
Neither one. Those OCXs do not have anything to do with ComboBox controls. The version numbers given to the "Microsoft Windows Common Controls" OCXs just happen to have values 5 and 6, but they are not the same 5 and 6 at all. The similar numbering is just an unfortunate accident.
Dilettante - Got it! that helps alot. thx. (that versioning and naming convention was confusing me alot!)
i can make the .exe to work ok... how do i get the IDE to show the version 6 features?
Last edited by Jimboat; Sep 4th, 2020 at 09:48 AM.
/Jimboat
-
Sep 4th, 2020, 09:17 AM
#32
Re: Windows 10 Look?
Originally Posted by Eduardo-
Then that sounds like the manifest can be built on the fly. Not sure if it really needs to be loaded from a file or resource or it just can be a string generated/stored in the program.
Yes, it must be a file or resource.
Originally Posted by Eduardo-
Even if it is required to be a file, the file might be temporary file that the same procedure creates in the temp folder.
You could, but that would be foolish. That data is meant to be persistent and the underlying mechanism caches it to save time in future runs.
Why do people want to drive by perching under the hood poking at things with sharp sticks? You risk getting burned and ground up in the moving parts. Sit in the driver's seat and use the controls provided for you there.
-
Sep 4th, 2020, 09:51 AM
#33
Re: Windows 10 Look?
Originally Posted by dilettante
Why do people want to drive by perching under the hood poking at things with sharp sticks? You risk getting burned and ground up in the moving parts. Sit in the driver's seat and use the controls provided for you there.
I think you're going to have to improve your treatment if you want to talk to people in a civilized manner.
Last edited by Eduardo-; Sep 4th, 2020 at 10:01 AM.
-
Sep 4th, 2020, 11:13 AM
#34
Re: Windows 10 Look?
Originally Posted by Jimboat
Dilettante - Got it! that helps alot. thx. (that versioning and naming convention was confusing me alot!)
i can make the .exe to work ok... how do i get the IDE to show the version 6 features?
The easiest way?
1. Save the manifest in the same folder as your VB6.exe
- rename that manifest VB6manifested.exe.manifest
2. Copy your VB6.exe into the same folder
- rename that copy: VB6manifested.exe
3. Now launch that new copy (with admin rights of course)
You will now have VB in 2 modes: manifested and the original non-manifested
Edited: One major annoyance with a manifested IDE is the loss of the color grid in the popup palette in the properties pane on right side of IDE. You know that small palette where you can choose system colors or non-system colors? The system colors part works just fine, the non-system grid isn't drawn. Try it to see what I mean. To get that back, I have an add-in you can compile and add to VB: https://www.vbforums.com/showthread....nifested-AddIn
Last edited by LaVolpe; Sep 4th, 2020 at 11:45 AM.
-
Sep 4th, 2020, 04:00 PM
#35
Addicted Member
Re: Windows 10 Look?
Originally Posted by LaVolpe
The easiest way?
1. Save the manifest in the same folder as your VB6.exe
- rename that manifest VB6manifested.exe.manifest
2. Copy your VB6.exe into the same folder
- rename that copy: VB6manifested.exe
3. Now launch that new copy (with admin rights of course)
You will now have VB in 2 modes: manifested and the original non-manifested
Edited: One major annoyance with a manifested IDE is the loss of the color grid in the popup palette in the properties pane on right side of IDE. You know that small palette where you can choose system colors or non-system colors? The system colors part works just fine, the non-system grid isn't drawn. Try it to see what I mean. To get that back, I have an add-in you can compile and add to VB: https://www.vbforums.com/showthread....nifested-AddIn
LaVolpe - many thanks. i'll give it a try!
-
Sep 4th, 2020, 10:24 PM
#36
Re: Windows 10 Look?
I know it is not good to reinvent the wheel, but I have about 100 usercontrol for different applications. But I just proceeded to continue some 50 or so. Precisely because of the appearance of my programs.
To make my job easier, I created two classes. One for font and one for colors ...
CLASS COLOR
Code:
Public Property Get FrontFocus() As Long
FrontFocus = RGB(105, 221, 255)
End Property
Public Property Get FrontUnfocus() As Long
FrontUnfocus = RGB(184, 255, 255)
End Property
Public Property Get FrontDisabled() As Long
FrontDisabled = &HC0C0C0
End Property
Public Property Get BackFocus() As Long
BackFocus = &HFEF1E7
End Property
Public Property Get BackUnfocus() As Long
BackUnfocus = &HFFFFFF
End Property
Public Property Get BackDisabled() As Long
BackDisabled = &HC0C0C0
End Property
Public Property Get BorderFocus() As Long
BorderFocus = RGB(46, 133, 255) '&HFFB70D '&HFBD748
End Property
Public Property Get BorderUnfocus() As Long
BorderUnfocus = RGB(169, 255, 247) '&HFFDE91
End Property
Public Property Get BorderDisabled() As Long
BorderDisabled = &H80000006
End Property
Public Property Get BackLeave() As Long
BackLeave = RGB(150, 221, 255) ' &HFBEABD
End Property
Public Property Get BackHover() As Long
BackHover = RGB(96, 204, 255) ' &HFFDE91
End Property
Public Property Get BackDown() As Long
BackDown = RGB(1, 191, 255) '&HFFC133
End Property
Public Property Get TextEnabled() As Long
TextEnabled = &H0&
End Property
Public Property Get TextDisabled() As Long
TextDisabled = &H4A4A4A
End Property
Public Property Get TextSelect() As Long
TextSelect = &HFFFFFF
End Property
Public Property Get TextOver() As Long
TextOver = &H966400
End Property
CLASS FONT
Code:
Public Property Get Standard() As StdFont
Dim oFont As StdFont
Set oFont = New StdFont
oFont.Name = "Merriweather"
oFont.Size = 8
oFont.Bold = False
oFont.Italic = False
oFont.Underline = False
oFont.Strikethrough = False
Set Standard = oFont
Set oFont = Nothing
End Property
Public Property Get Selected() As StdFont
Dim oFont As StdFont
Set oFont = New StdFont
oFont.Name = "Merriweather"
oFont.Size = 9
oFont.Bold = True
oFont.Italic = False
oFont.Underline = False
oFont.Strikethrough = False
Set Selected = oFont
Set oFont = Nothing
End Property
As it is the paradigm of many working on functionality, I still haven't finished the right colors, but I'm already finishing this month my work.
Edit:
My problem is that I am in love with blue color ....
Last edited by Episcopal; Sep 4th, 2020 at 10:28 PM.
-
Sep 8th, 2020, 07:43 AM
#37
Addicted Member
Re: Windows 10 Look?
Originally Posted by dilettante
SSTab was deprecated long ago as a Win3.x look legacy control.
TabStrip has better support since it wraps a Common Control:
dilettante - is this TabStrip from Microsoft Windows Common Controls 6.0 or 5.0 (components)? I am not getting a flat control when i use 6.0 in VB6 IDE with manifest, although i am getting good (flat) versions of other controls such as combobox, label, commandbutton?
Last edited by Jimboat; Sep 8th, 2020 at 08:09 AM.
/Jimboat
-
Sep 8th, 2020, 09:01 AM
#38
Re: Windows 10 Look?
It is the COMCTL32.OCX TabStrip. The other one is frozen at the Windows 95 look.
-
Sep 8th, 2020, 10:15 AM
#39
Lively Member
Re: Windows 10 Look?
Coincidence, I just started a thread about the LaVolpe DLL for customizing the non client area on a form. Does it work on Win 10? I flattened out the generic Microsoft (created with a hammer and chisel) 3D and replaced it with custom controls that have a subtle Linux look/feel. About the only client area thing I haven't been able to fix is the clunky MSFlexGrid scrollbars. Then on to address the non client areas, like menu bars, title bar, borders, etc ... Hopefully with the LaVolpe DLL. Good luck, I'll keep monitoring this thread looking for ideas. Bob.
-
Sep 8th, 2020, 10:34 AM
#40
Addicted Member
Re: Windows 10 Look?
Originally Posted by dilettante
It is the COMCTL32.OCX TabStrip. The other one is frozen at the Windows 95 look.
so, that's the same for ToolBar too, then? (5.0 w/COMCTL32.OCX)
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
|