aboutsummaryrefslogtreecommitdiff
path: root/Histacom2/OS/Win98/Win98.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Histacom2/OS/Win98/Win98.cs')
-rw-r--r--Histacom2/OS/Win98/Win98.cs52
1 files changed, 36 insertions, 16 deletions
diff --git a/Histacom2/OS/Win98/Win98.cs b/Histacom2/OS/Win98/Win98.cs
index e9a7d60..3a0b216 100644
--- a/Histacom2/OS/Win98/Win98.cs
+++ b/Histacom2/OS/Win98/Win98.cs
@@ -33,6 +33,17 @@ namespace Histacom2.OS.Win98
public bool hiddenpadamsFound = false;
public WinClassicTimeDistorter2 distort;
+
+ // Overrides the Painting function of the Form, so that you don't see all that crap drawing.
+ protected override CreateParams CreateParams
+ {
+ get
+ {
+ CreateParams cp = base.CreateParams;
+ cp.ExStyle |= 0x02000000; // Turn on WS_EX_COMPOSITED
+ return cp;
+ }
+ }
// Init the form
public Windows98()
@@ -115,22 +126,6 @@ namespace Histacom2.OS.Win98
// Bring to this the front
this.BringToFront();
- //Check if it is the first time
- if (!CurrentSave.FTime98)
- {
- CurrentSave.FTime98 = true;
- SaveGame();
- welcome = wm.Init(new Win98Welcome(), "Welcome", null, false, false, resize: false);
- AddTaskBarItem(welcome, welcome.Tag.ToString(), "Welcome", null);
-
- nonimportantapps.Add(welcome);
- nonimportantapps[nonimportantapps.Count - 1].BringToFront();
- nonimportantapps[nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(NonImportantApp_Closing);
-
- welcome.BringToFront();
- welcome.Activate();
- }
-
// Update the desktop Icons!
DesktopController.RefreshDesktopIcons(new ListViewItem[] { new System.Windows.Forms.ListViewItem("My Computer", 0),
@@ -572,6 +567,31 @@ namespace Histacom2.OS.Win98
}
}
}
+
+ private void waitUntil98Loaded_Tick(object sender, EventArgs e)
+ {
+ if (Visible)
+ {
+ //Check if it is the first time
+ if (!CurrentSave.FTime98)
+ {
+ CurrentSave.FTime98 = true;
+ SaveGame();
+ welcome = wm.Init(new Win98Welcome(), "Welcome", null, false, false, resize: false);
+ AddTaskBarItem(welcome, welcome.Tag.ToString(), "Welcome", null);
+
+ nonimportantapps.Add(welcome);
+ nonimportantapps[nonimportantapps.Count - 1].BringToFront();
+ nonimportantapps[nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(NonImportantApp_Closing);
+
+ welcome.BringToFront();
+ welcome.Activate();
+
+ waitUntil98Loaded.Enabled = false;
+ }
+
+ }
+ }
}
}