如何通过C#更改所有表单中的字体,颜色和大小 [英] How Can I Change Fonts,Colors And Sizes In All Forms By C#

查看:142
本文介绍了如何通过C#更改所有表单中的字体,颜色和大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何通过c#

推荐答案

更改所有表单中的字体,颜色和大小C#是一种编程语言,因此你只能控制自己程序中的表单。



如果你想改变整个窗口的可读性,请在destktop上的任意位置右键单击,选择屏幕分辨率,然后制作文字和其他较大或较小的物品,翻盖更大,然后点击应用。



也熟悉使用Windows键+'+'激活Windows 7中的放大镜那个windows键和+/-会放大和缩小,而windows key + esc会退出,这有时非常有用。事实上,使用这些快捷键的专家可以很容易地看到屏幕上的任意内容并且像素足够以下是其他快捷方式:



Ctrl + Alt + Spacebar以全屏模式预览桌面

Ctrl + Alt + F切换到全屏模式

Ctrl + Alt + L Switc h到镜头模式

Ctrl + Alt + D切换到停靠模式

Ctrl + Alt + I反转颜色

Ctrl + Alt +箭头键向箭头键方向平移

Ctrl + Alt + R调整镜头大小



你也知道按住ctrl键并且滚动鼠标会在大多数应用程序中放大或缩小,特别是在Opera浏览器中很好地实现。



现在作为C#程序员你可能想要包含字体缩放以处理用户执行ctrl +滚动,例如在你自己的基本形式,并从中派生所有未来的形式。

你还想处理一个滚动事件,以便它调整字体的大小,因为最常见的错误之一是启用字体缩放而不处理例如,缩放字体的大小不太可能适合分配给默认标签的空间,在这种情况下,放大镜实际上做得更好,除非你真的在那里过度使用,恕我直言,你应该;)当你永远都能够再次这样做!
C# is a programming language and as such you can control the forms in your own program only.

ifyou want to change the readability of entire windows rightclick anywhere on the destktop, choose screen resolution, then "Make text and other items larger or smaller, flap to larger and click apply.

also familiarize yourself with the magnifier which in windows 7 is activated with windows key + '+', after that windows key and +/- will zoom in and out and windows key + esc will exit, this is hugely usefull at times. in fact an expert at using these shortcuts can pretty easily see anything at will which is on screen and has pixels enough. Here are the rest of the shortcuts:

Ctrl+Alt+Spacebar Preview the desktop in full-screen mode
Ctrl+Alt+F Switch to full-screen mode
Ctrl+Alt+L Switch to lens mode
Ctrl+Alt+D Switch to docked mode
Ctrl+Alt+I Invert colors
Ctrl+Alt+arrow keys Pan in the direction of the arrow keys
Ctrl+Alt+R Resize the lens

also did you know that holding down the ctrl key and scrolling on the mouse will zoom in or out on most applications, especially well implemented in the opera browser incidently.

Now as a C# programmer you may want to include font scaling to handle user doing the ctrl+scroll e.g. in your own base form and derive all your future forms from that.
Also you wanna handle a scroll event so that it resizes the font as one of the most common mistakes is to enable font scaling without handling that the size of the font which is scale is unlikely to fit the space allocated to the default label for instance and in this case the magnifier actually does a better job, unless you really go overboard on usability there, which IMHO you should ;) as you will ALWAYS be able to do that again, ever after!


这篇关于如何通过C#更改所有表单中的字体,颜色和大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆