form resizes on screen power down/up

GrancoClark

New member
Joined
Aug 2, 2023
Messages
1
Programming Experience
10+
Hello,
Visual Studio/Basic .NET 2013. I know, I know, a bit older, but I'm trying to breath life into this older application for now. I have a windows forms application that when there is a screen power up/down, it loses its 'size' as noted and demonstrated below.
The top image being when initially running it and OK, and the second image being after a screen power cycle. The screen has the same resolution and settings after the power cycle. The reason why the power cycle happens commonly and is pertinent, is because it is a situation where a monitor is switched back and forth between two computers with a KVM switch. It is when it is switched away to the other computer and switch back that I get the second image below.
I took out the KVM switch and tried the same thing just on a monitor cycle power and it does the same thing, so it's software/app and not hardware. I've looked at/experimented with AutoScaleMode and AutoSizeMode with no success yet. Does anywone know or have ideas? Thanks much.


Capture.PNG


Capture2.PNG
 
Back
Top