aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.WinForms/WindowBorder.cs
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-04-14 10:50:05 -0400
committerMichael <[email protected]>2017-04-14 10:50:05 -0400
commitfb481614fc2cd64357d60c4459adb5b65072bbce (patch)
tree484c7c2556eda1f3a2acf4d3b9faf4de42d4b82a /ShiftOS.WinForms/WindowBorder.cs
parent791290857f6feed7da6b583b8f39cb45698d69e8 (diff)
downloadshiftos_thereturn-fb481614fc2cd64357d60c4459adb5b65072bbce.tar.gz
shiftos_thereturn-fb481614fc2cd64357d60c4459adb5b65072bbce.tar.bz2
shiftos_thereturn-fb481614fc2cd64357d60c4459adb5b65072bbce.zip
Dramatic speed-up of window loading.
Diffstat (limited to 'ShiftOS.WinForms/WindowBorder.cs')
-rw-r--r--ShiftOS.WinForms/WindowBorder.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/ShiftOS.WinForms/WindowBorder.cs b/ShiftOS.WinForms/WindowBorder.cs
index 4babbbd..e716803 100644
--- a/ShiftOS.WinForms/WindowBorder.cs
+++ b/ShiftOS.WinForms/WindowBorder.cs
@@ -146,8 +146,6 @@ namespace ShiftOS.WinForms
};
- this.Left = (Screen.PrimaryScreen.Bounds.Width - this.Width) / 2;
- this.Top = (Screen.PrimaryScreen.Bounds.Height - this.Height) / 2;
if (!this.IsDialog)
{
@@ -171,7 +169,6 @@ namespace ShiftOS.WinForms
}));
};
- ParentWindow.OnLoad();
}
/// <summary>
@@ -208,6 +205,9 @@ namespace ShiftOS.WinForms
public void WindowBorder_Load(object sender, EventArgs e)
{
this.DoubleBuffered = true;
+ this.Left = (Screen.PrimaryScreen.Bounds.Width - this.Width) / 2;
+ this.Top = (Screen.PrimaryScreen.Bounds.Height - this.Height) / 2;
+ ParentWindow.OnLoad();
this._parentWindow.Show();
}