Question How to enlarge the letters of properties in Winform

BrunoB

Well-known member
Joined
Nov 19, 2022
Messages
96
Programming Experience
Beginner
Hello, good evening, does anyone know how to do it? Thank you.

1675211701160.png
 
By default the Win32 GDI window caption font and font size is controlled by the OS. WinForms is just a wrapper around the Win32 GDI windows. In older versions of Windows, you could customize the fonts and font size, and the change would apply globally to all apps. In current versions of Windows, you'll need to do some registry hacking or port older versions of the Windows PowerToys.

If you don't want the OS drawing the caption for you, you'll need to remove the caption and draw your own.
 
As for within your form, most of the controls let you choose the font and font size. You would need to set that to each control you use.

If you want to try to do something without having to touch each control, you could potentially try to play games with the scaling values. Or you could go down to the GDI level and try to twiddle some settings.

Any which way, it is really a poor idea to mess with the OS default settings. It breaks with the Windows design guidelines. It people who break the Windows design guidelines which makes people say that they love their Mac because all the apps have consistent UI, but Windows is so fragmented because of the inconsistent UI.
 
Are you talking about the size of text on your own form, or in the Properties window of VS?

In future, don't ask your question in the title of the thread. Write a FULL and CLEAR explanation of the problem in your post, then summarise that post in the title. The post should stand alone and the title should be enough to give us a good idea of the subject when listed without the post.
 
By default the Win32 GDI winDo you mean modify it from the BIOS?dow caption font and font size is controlled by the OS. WinForms is just a wrapper around the Win32 GDI windows. In older versions of Windows, you could customize the fonts and font size, and the change would apply globally to all apps. In current versions of Windows, you'll need to do some registry hacking or port older versions of the Windows PowerToys.

If you don't want the OS drawing the caption for you, you'll need to remove the caption and draw your own.
Do you mean modify it from the BIOS?
 
No. Modify it from a Windows Control Panel applet when the feature to modify it was available in older versions of Windows. Current versions (Win10, Win11) don't have that Control Panel applet anymore.

As I mentioned above, you may need to edit the registry directly, or port some older Windows PowerToy which used to be a souped up version of the Control Panel applet.

Or you could try using the Win32 API that modifies the system metrics.
 
Tools > Options > Environment > Fonts and Colors:
show settings for Environment, select your font and size.
Restart VS for it to apply to Properties window also.
 
Tools > Options > Environment > Fonts and Colors:
show settings for Environment, select your font and size.
Restart VS for it to apply to Properties window also.
unfortunately it works for the letters of the code only.
I use VS2019,maybe in 2022 this works ok.
 
Then you have changed the setting for Text Editor, I said settings for Environment:

1675518717608.png
 
Solution
Now the problem is that the videos I watch have very small property letters... and I have to use the Windows magnifying glass to close, focus, reopen etc, it's VERY annoying. Is there any way to enlarge the lyrics of the videos?
I'm afraid not...thank you.
 
If anything small in screen is too small then you can either reduce the screen resolution or increase the scaling - both these found in Windows settings for screen. Or as @cjard suggested get a bigger monitor, some people can also benefit from glasses.
 
Some people are not meant to have 4K monitors...
 
So, here's a brief intro

Your monitor is made of very small dots that are all capable of shining with a colored light. On a typical HD monitor there are 1080 rows each containing 1920 dots, so about 2 million dots on the monitor.

If a 1920x1080 monitor is about 60cm from the bottom left corner to the top right corner then the dots will be 4 times as big as a 1920x1080 monitor that is 30cm from bottom left to top right

Every picture that your computer draws on the monitor has a number of dots wide and number of dots high. If you had a picture that was 1920x1080 dots, then it would show perfectly on a 1920x1080 monitor. Every dot in the picture has a dot on the monitor. if you had a picture that was 960x540 then you could open it in its natural size, and it would show in 25% of the space on the monitor, or you could ask Windows to make it bigger. If windows doubled the 960 and doubled the 540 then the picture would now be 1920x1080 and it would take up all of the screen..

But it still only shows 960 dots of picture information, and it might start to look "not smooth"

Let us take the more ridiculous example. Let us have a very small picture: 192x108 pixels big image. When we show it on the 1920x1080 screen it will take up just 1% of the screen, because we could get another 99 copies of this picture on the screen. It takes up the bottom left corner, and we could fit another 9 above it and another 9 to the right of it. That's 100 copies of it.

You could ask windows to magnify it to take up all the screen, but it still only shows 192 dots of information wide, and 108 high. it would look like minecraft; huge blocks of the same colour

On a 30cm monitor, this small picture 192x108, is about 3cm in size. In a 60cm monitor it is about 6 cm in size

If you want it to look smooth and nice and not like minecraft you need to use a picture with more dots information inside it. If you want it to be bigger you have to make the monitor bigger, or you have to reduce the amount of information it shows at the same time (and maybe put up with it looking bad)

--

So here we have all your options.

If you cannot see something on your screen you can:

* Buy a physically bigger monitor - throw your 30cm 1920x1080 monitor away and buy a 60cm 1920x1080 one
* Ask windows to show everything bigger - keep your monitor but run it in 960x540 resolution instead of 1920x1080 - you wont be able to see as much on the screen, because windows is drawing all pictures bigger (zoomed in). You can only see a quarter of the word document you could see before, but it is 4x bigger. It's like having a magnifier - you see things bigger, but you have to look around to see all the things
* Make some things bigger - ask visual studio to draw its text scaled 200% - everything else, the mouse pointer, VLC, web pages etc, will be small, but the text in visual studio will be bigger, and you will see less of the text


--

But beware. If you buy another monitor and it has MORE DOTS on its screen, then you will still have the same problem

You have 30cm 1920x1080 monitor
You throw it away and buy 60cm 3840x2160 monitor

You still have the same problem. Your new screen is 4 times bigger than the old screen (60cm vs 30cm) but it can also show 4 times more dots.

If you run your new monitor in 3840x2160 it would be like having 4 of your old monitors in a rectangle layout, and the text etc will be just as tiny as it was before. On your old monitor your word document font is 1 cm high and you cannot see it. On your new monitor your text is still 1cm high and you still cannot see it. But you can put 4 pages on screen at once instead of 1, and still not see them

Of course, you can then ask windows to draw everything bigger - run your 3840x2160 monitor in 1920x1080 resolution. Everything will look 4 times bigger.. But you might as well have just bought a 60cm 1920x1080 monitor if you were going to do that...


"More dots and same centimeters means everything on screen gets smaller. More centimeters and same dots means everything gets bigger. More dots and more centimeters means it may stay the same size"
 
Last edited:
Back
Top Bottom