improved Start hidden

git-svn-id: svn://svn.code.sf.net/p/processhacker/code@698 21ef857c-d57f-4fe0-8362-d861dc6d29cd
This commit is contained in:
wj32
2009-02-21 11:02:59 +00:00
parent 040c857365
commit a0fc65e612
2 changed files with 17 additions and 4 deletions
+12 -3
View File
@@ -2106,6 +2106,9 @@ namespace ProcessHacker
LoadSettings();
if (Properties.Settings.Default.StartHidden || Program.StartMinimized)
this.Location = new Point(-3200, -3200);
// load symbols on a separate thread
Thread t = new Thread(new ThreadStart(delegate
{
@@ -2148,13 +2151,19 @@ namespace ProcessHacker
if (Properties.Settings.Default.StartHidden || Program.StartMinimized)
{
// HACK: I can't seem to be able to hide the window here, so I have to use a timer!
// HACK
System.Windows.Forms.Timer t2 =
new System.Windows.Forms.Timer();
t2.Interval = 10;
t2.Interval = 1;
t2.Tick +=
(sender_, e_) => { this.Hide(); t2.Enabled = false; };
(sender_, e_) =>
{
t2.Enabled = false;
this.Hide();
this.Location = Properties.Settings.Default.WindowLocation;
t2.Dispose();
};
t2.Enabled = true;
}
+5 -1
View File
@@ -209,7 +209,11 @@ namespace ProcessHacker
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(HackerWindow = new HackerWindow());
Application.Run(HackerWindow = new HackerWindow()
{
Location = new Point(-3200, -3200),
StartPosition = FormStartPosition.Manual
});
}
public static void StartProcessHackerAdmin()