0

enter image description hereThe dropdownlist and the combo box doesn't sync in bigger screens Works perfectly fine with smaller screens. When I click on the drop down the list appears somewhere else on the screen as higlighted. In smaller screens works fine as shown in this imageenter image description here

 this.m_ComboBoxType.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
        | System.Windows.Forms.AnchorStyles.Right)));
        this.m_ComboBoxType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
        this.m_ComboBoxType.FormattingEnabled = true;
        this.m_ComboBoxType.Location = new System.Drawing.Point(89, 26);
        this.m_ComboBoxType.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
        this.m_ComboBoxType.Name = "m_ComboBoxType";
        this.m_ComboBoxType.Size = new System.Drawing.Size(199, 24);
        this.m_ComboBoxType.Sorted = true;
        this.m_ComboBoxType.TabIndex = 3;
        this.m_ComboBoxType.SelectionChangeCommitted += new System.EventHandler(this.m_ComboBoxType_SelectionChangeCommitted);

Enabling the compatibity property "Disable display scaling on high DPI settings" of the application solved the problem. But how do I do it from the C# application code. Adding below code in the manifest solves issue. But this makes the application blurry in the laptop.

<asmv3:application>
 <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2017/WindowsSettings">
   <gdiScaling>true</gdiScaling>
 </asmv3:windowsSettings>

Please me with the exact code for the below settings in the image enter image description here Setting property to application, only solves my problem. Setting it to system and system advanced creates issue in smaller screen. How do I set it to application using code.

Shruthi
  • 1
  • 1
  • [How to configure an app to run correctly on a machine with a high DPI setting (e.g. 150%)?](https://stackoverflow.com/a/13228495/7444103). – Jimi May 16 '19 at 14:38
  • You should probably fix the image, which is not displaying. Also, consider explaining the problem more clearly, including some context, then say what you've tried. – mdarwin May 16 '19 at 14:44

0 Answers0