how to show complete window when screen resolution changed C#
I have a WinForm,when the i开发者_开发技巧ts size is 700x700,when I change the screen resolution of the system from 1366x768 to other(like 800x600),only part of the window is visible.How can I make it fully visible? what property of the form i have to change?
I would say would say you want to adjust your Form.Size
and Form.Location
to fit within the Screen.GetWorkingArea()
. You will want to do that when the event Microsoft.Win32.SystemEvents.DisplaySettingsChanged
is fired. As in this answer.
You will want to adjust the Bounds
property of your form. Screen.PrimaryScreen
can support you to get the new right size.
精彩评论