winforms icon indicating copy to clipboard operation
winforms copied to clipboard

[Multi-Monitor] Unhandled exception pops up when expanding DataGridView ComboBox dropdown list on secondary monitor

Open Olina-Zhang opened this issue 3 years ago • 2 comments

.NET version

7.0.100-preview.7.22323.18

Did it work in .NET Framework?

No

Did it work in any of the earlier releases of .NET Core or .NET 5+?

No

Issue description

Unhandled exception pops up when expanding DataGridView ComboBox dropdown list to choose item on secondary monitor image https://user-images.githubusercontent.com/26474449/176389641-8c4dda22-f26b-459f-9cb8-df37f209fcc1.mp4

Steps to reproduce

Repro steps:

  1. Set 2 monitors environment with different DPI values: Primary monitor is 300% DPI, secondary monitor is 100% DPI
  2. Create a Winforms application with targeted .Net 7.0
  3. Add a DataGridView to form designer and add a ComboBox column with some items
  4. In this app's csproj file, add following value <ApplicationHighDpiMode>PerMonitorV2</ApplicationHighDpiMode>
  5. Build and run application
  6. In primary screen, click DataGridView comboBox dropdown list to choose item, then move form to secondary screen, click DataGridView comboBox dropdown list to choose item again

or use following app to test: Uploading DGV_ComboBox.zip…

Olina-Zhang avatar Jun 29 '22 08:06 Olina-Zhang

And ComboBox is set to AutoComplete mode. This happen only when that property on Combobox is set.

dreddy-work avatar Jun 29 '22 23:06 dreddy-work

Let's take a look at this when we get to doing the DGV in PerMonitorV2. I think taking a holistic approach to the DGV.

merriemcgaw avatar Jul 05 '22 23:07 merriemcgaw