鉴于Form
我想在切换屏幕后将表单居中。我怎样才能完成任务?
internal static void SetFormToBiggestMonitor(Form form, bool center = true)
{
Screen biggestScreen = FindBiggestMonitor();//assume this works
form.Location = biggestScreen.Bounds.Location;
if (center)
{
form.StartPosition = FormStartPosition.CenterScreen;
}
}