I've a Windows Form VS 2013 application that is configured to require at a minimum .NET Framework 4.0. This application is distributed to several different pharma customers.

I have .NET 4.5.2 installed on my development machine. All users have a mix of .NET 4.0 to .NET 4.5.2. I've never had a problem with the application.

A customer just started to have problems. I noticed that their IT dept pushed down .NET 4.6.1 to all client machines. I've identified that, in a .NET 4.6.1 environment, when the datagridview.columns(x).minimumwidth property is set in code, the following error is trapped: "Object reference not set to an instance of an object." Which is goofy because several datagridview properties are set in previous lines in the code.

Even more goofy is that this happens with only two out of ~50 datagridview objects - all the other "datagridview.columns(x).minimumwidth = xx" lines of code do not result in error.

Notes;
1. I've tried deleting the two datagridviews and recreating them, but no luck.

I've found sporadic compatibility complaints about .NET 4.6.1, but haven't found anything specific about 4.6.1 and datagridviews. I've found this general post by Microsoft describing .NET 4.6.1: https://msdn.microsoft.com/en-us/lib...0%29.aspx#v461 This post has something about 4.5.2 and 4.6.1 and a new 'EnableWindowsFormsHighDpiAutoResizing' element, but it's an opt-in feature and shouldn't affect datagridviews as they reside in my application: "...This is an opt-in feature. To enable it, set the EnableWindowsFormsHighDpiAutoResizing element to true in the application configuration (app.config) file...."

I actually tried enabling EnableWindowsFormsHighDpiAutoResizing, but it had no effect - the error still occurred in a 4.6.1 environment.

If anyone has any insight to this issue, that would be great. Thanx!