Report Viewer - scaling issue with system DPI change

后端 未结 2 1232
暖寄归人
暖寄归人 2021-01-12 15:04

I have a Winforms application (in Visual Studio 2010) that contains a Report Viewer control that previews and prints an A4 size report.

One user has his Windows font

2条回答
  •  悲&欢浪女
    2021-01-12 15:53

    I ran into the same problem. WinForms ReportViewer is already DPI aware and will do its own scaling. You just have to tell the system that your application is DPI aware so that the system doesn't try to scale it after.

    Add a manifest to your application if you haven't already, then inside the tag, add the following:

      
        
          true
        
      
    

    You can also use an API function SetProcessDPIAware, but it is recommended against: http://msdn.microsoft.com/en-us/library/ms633543.aspx

提交回复
热议问题