EFileTahi-A Posted January 21, 2013 Posted January 21, 2013 How can I ignore window's font size scale settings? Because if the font size is set to 125% or above my app will be completely wasted as dozens of controls will overlap and text itself will be cut in 90% of the cases. Not to mention that one of my forms got destroyed when I opened it in my new Notebook which had the font size set to 125%. I had to reposition every damn control on that form when I set the font size back to 100%. So, how can I completely bypass window's auto font scale size? (The correct way to see it) I understand that I shouldn't override the user's chosen settings in windows, but I have no other way to let my custom controls function properly as everything is measured using pixel precision. (My way to see it) My app, my rules. Don't like it? Don't use it. Anyway, I understand I need to set control scale to none but I'm not sure how to stop text from scaling. Thanks. Quote
Administrators PlausiblyDamp Posted January 21, 2013 Administrators Posted January 21, 2013 It would be far, far better to try and adapt to the user's settings as opposed to overriding them. If a user has selected a particular font size they have probably done this for a reason, ignoring this setting will often leave the application unusable for these users. As a rule saying My app, my rules. Don't like it? Don't use it. will often result in users not using your application. If you are using WinForms for your app then built in controls such as the TableLayoutPanel can be a big help in laying out your app and coping with different screen resolutions and sizes. Same can be said for using the Dock and Anchor properties of a control. http://support.microsoft.com/kb/182070 gives a technique or two for handling resizing of controls (example is in VB but shouldn't be too hard to follow regardless). Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
EFileTahi-A Posted January 21, 2013 Author Posted January 21, 2013 (edited) It would be far, far better to try and adapt to the user's settings as opposed to overriding them. If a user has selected a particular font size they have probably done this for a reason, ignoring this setting will often leave the application unusable for these users. I understand that letting the system handling it can, in most cases, be the best approach and that it should be considered seriously, but it sure doesn't make it a golden rule. Just because I'm using .NET controls (which are actually custom made controls) it doesn't mean they have to be exposed to changes from an outside source to behave like a common form. In this case, this is not about what the user wants / needs, this is about what the app needs in order to function right; in order to actually function. It is like requesting the user to have a DX11 card to run a DX11 game or having a VGA capable screen to run Windows XP. will often result in users not using your application. There are many reasons that can led a user to cease using a certain application. Believe me, text size it is not among them. Even those near me that use their small 7 inch netbooks have their text set to 100%. I never had a discussion in my life with anyone regarding a piece of software having the text font set to 9 instead 8. My app cannot be scaled. If it does, text won't fit because there isn't room for controls to scale. Thanks Edited January 21, 2013 by EFileTahi-A Quote
Leaders snarfblam Posted January 21, 2013 Leaders Posted January 21, 2013 Does the font still scale if you set the AutoScaleMode property to None? I never had a discussion in my life with anyone regarding a piece of software having the text font set to 9 instead 8. I don't mess with the font size in Windows because it breaks the UI of some programs. They don't deal with scaling properly. (This even includes software I've written. :( ) Ideally, though, I would prefer to scale the fonts up. I do scale the fonts up in my browser, though. In earlier versions of FireFox, depending on how a font's size was set, sometimes the text wouldn't scale. It definitely bothered me. Quote [sIGPIC]e[/sIGPIC]
EFileTahi-A Posted January 22, 2013 Author Posted January 22, 2013 (edited) Does the font still scale if you set the AutoScaleMode property to None? The text still scales :( I don't mess with the font size in Windows because it breaks the UI of some programs. They don't deal with scaling properly. (This even includes software I've written. :( ) Ideally, though, I would prefer to scale the fonts up. I do scale the fonts up in my browser, though. In earlier versions of FireFox, depending on how a font's size was set, sometimes the text wouldn't scale. It definitely bothered me. What I plan to do is to detect the scale size set by Windows to let my app do the scaling by itself (manually). This way I can decide which controls can have their text scalde without compromising their functionality. Some will, others won't scale at all. I will try to do it this weekend. This requires time because the moment I change the font scale above 100% my .NET project will be immediately scaled messing up all my forms in the designer view. I will need to work over a backup of my project until I get it right. I hope I can post a solution here afterwards. Edited January 22, 2013 by EFileTahi-A Quote
EFileTahi-A Posted January 31, 2013 Author Posted January 31, 2013 Well, I didn't find the time to look into it during the weekend and to be honest, I will leave this issue for last as it is the least of my concerns now now. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.