winforms - Windows Form form size truncated on Japanese OS -


We have a Japanese user who reports that the size of a form is small (small size, not all controls are shown ) On your Japanese machine In the file .designer.cs in the form of windows, we have these settings:

  this.AutoScaleDimensions = new System.Drawing.SizeF (6F, 13F); This.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; In addition, in the form CTOR, we have some code that appears to accommodate the size of the DPI size. The Japanese user has a regular DPI set O96.  
  // // Adjust the size of the form with DPIRio // var size = this Shape; // DPRIATO 1.0 is if the DPI is 96, then // is lower than DPIROTO 1.0, if DPI is more than 96 DPIROTO = DPIHlpPPRITIO; Var newSize = new size ((int) (size.Width / dpiRatio), (int) (size HEIGHT / dpiRATO)); This.MaximumSize = newSize; This.MinimumSize = newSize; This.Size = newSize;  

I'm sure it comes from different sets of fonts on Japanese Windows, but there are no guides to handle it on the web. Any ideas?

This is the second snippet of code that exemplifies East Asian machines often take advantage of XP features. Good for the readability of their complex characters which allows the system to increase font size without increasing the DPI.

Just remove the code to solve the problem. If you want to raw the form, set FormBorderStyle for it, say, Fixed 3D If you insist on trapping the boundary, you will need to move the minimum / maximum session assignment of the load event. Then the size of the form is similar to the size of the property and the system font size as well as the size of the user size or the size of the caption text. Which BTW is another failure mode for your code.


Comments