0

I am having a rather odd issue that I have been unable to find the answer to. I have 2 PCs that I am doing coding on - one a desktop PC and one a notebook (QuadHD resolution). Each has Windows 8.1 & Visual Studio 2013 Update 5 installed.

I have localized all my Forms and it seems that when I edit the Winform on my notebook, it causes very odd resizing issues to occur. For example, if I simply change the "Language" property from one language to another (that I have already translated), the entire form is skewed and re-sized, completely destroying all the layout of the form in the selected language. On another form, the "ImageScaling" property is erroneously changed from 16x16 to 40x40.

The issue seems to be related to the changing of the 'Language' property. Almost like there's some sort of resizing logic & layout logic being applied when this property is changed.

When I perform the same operation on my desktop PC, I get no such odd modifications (as I'd expect). This obviously renders my notebook completely useless for being able to do any WinForms work!

I initially thought this might be related to some quirk with the QuadHD display (i.e. 3.2k x 1.8k). I have tried to reduce the screen resolution to a regular HD quality, however this doesn't seem to resolve the issue.

Does anyone have any hints about what I could try to fix this problem?

Thanks.

Simple Guy
  • 568
  • 5
  • 21
  • This is most likely related to your Text size property and indeed somewhat related to your display scale settings. make sure they're both set to the same scaling factor (preferably 100%): http://windows.microsoft.com/en-US/windows-8/make-text-screen-larger-smaller/?v=t – jessehouwing Sep 06 '15 at 11:38
  • Hi Jessehouwing - thanks for your reply. I've just tried looking at my "Display" settings on Win 8.1 and all I have under "More options" is to "Change the size of apps, text and other items on the screen". The setting was set at "Default" and the only other option is "Small". I tried changing the setting but it had no effect on the problem. My forms are still being altered for no apparent reason. Possibly worthwhile noting that the text size isn't being altered - it's the size & position of labels, text-boxes (etc) and also the form's size as well! – Simple Guy Sep 06 '15 at 11:58
  • Yeah, this is part of the display scaling options. You should have an advanced option as well, it may be hidden under there. – jessehouwing Sep 06 '15 at 12:09
  • Have you tried changing your forms `AutoScaleMode` to `None` for instance (by default it is `Font`) – Ivan Stoev Sep 06 '15 at 12:11
  • Hi jessehouwing, no advanced options as far as I can see. Microsoft always seem to move all these options around to keep you guessing. Ivan - thanks for your suggestion. I tried to do this: 1) Revert back to the original version of the form then 2) Only change the AutoScaleMode property to 'None'. I then run my application and it seems that the toolbar icons are scaled to 40x40 instead of 16x16 (as it appears in the designer). – Simple Guy Sep 06 '15 at 12:30
  • Any chance you have an auto-scale utility installed? Lenovo and Dell laptops ship with such utility. Is your application "DPI aware"? http://stackoverflow.com/a/4076259/736079 – jessehouwing Sep 06 '15 at 15:49
  • Hi jessehouwing, Many thanks for your link - that was very interesting. I do have a Dell, however could not see any DPI utility. Off the back of your comment, however, I found this article to change the Display Settings:http://www.sevenforums.com/tutorials/443-dpi-display-size-settings-change.html. I'm not sure if this i what you were originally referring to, but it appears that if I set my scaling to 100% (it was previously a default of 250%), the problem seems to be resolved! That said, the font size on my screen is so small that I can barely read it :) – Simple Guy Sep 07 '15 at 06:57
  • I'm not exactly sure how to proceed from here - whether to leave he settings as-is and then change the default font size for each application to make it larger. Windows seems to have a font-size option but it only applies to title bars, menus, etc. but not the main text. – Simple Guy Sep 07 '15 at 07:02

1 Answers1

0

The only workaround I have been able to come across so far is to ensure that your Windows Settings->Display->Scaling is 100% BEFORE making any modifications to the form (including changing any seemingly innocuous properties such as 'Language'). On high-resolution screens, this unfortunately makes the content almost unreadable but at least the forms are not completely ruined/resized when you edit them. You will unfortunately need to do all your edits in this mode and commit them before reverting your scaling back to its original setting.

Simple Guy
  • 568
  • 5
  • 21
  • Further to this answer, it appears I need to ensure all the controls are docked to the edges of the form. Without doing this, it seem that the form can resize for some reason (in designer mode and run-time) and cause the contained controls to not be visible. – Simple Guy Sep 30 '16 at 06:55