aboutsummaryrefslogtreecommitdiff
path: root/Histacom2/OS/Win95/Win95.cs
diff options
context:
space:
mode:
authorMichael Webb <[email protected]>2019-04-06 14:06:57 -0500
committerMichael Webb <[email protected]>2019-04-06 14:06:57 -0500
commit3f3c2087d86d0a3a26d6878557c6e37a3e4b625d (patch)
tree661475d3909c9c8886f81fc2cbaee2a60fc4ff45 /Histacom2/OS/Win95/Win95.cs
parent7a17bdcb24e580a357bb1f9b8a925315eac33e64 (diff)
downloadhistacom2-3f3c2087d86d0a3a26d6878557c6e37a3e4b625d.tar.gz
histacom2-3f3c2087d86d0a3a26d6878557c6e37a3e4b625d.tar.bz2
histacom2-3f3c2087d86d0a3a26d6878557c6e37a3e4b625d.zip
[EXPERIMENTAL] Fix for the flickering issue, esp. on Bad XP
Diffstat (limited to 'Histacom2/OS/Win95/Win95.cs')
-rw-r--r--Histacom2/OS/Win95/Win95.cs51
1 files changed, 35 insertions, 16 deletions
diff --git a/Histacom2/OS/Win95/Win95.cs b/Histacom2/OS/Win95/Win95.cs
index ad828ba..c0f3622 100644
--- a/Histacom2/OS/Win95/Win95.cs
+++ b/Histacom2/OS/Win95/Win95.cs
@@ -36,6 +36,17 @@ namespace Histacom2.OS.Win95
ListViewItem heldDownItem;
Point heldDownPoint;
+
+ // 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 Windows95()
@@ -113,22 +124,6 @@ namespace Histacom2.OS.Win95
// Bring to this the front
this.BringToFront();
- //Check if it is the first time
- if (!CurrentSave.FTime95)
- {
- CurrentSave.FTime95 = true;
- SaveGame();
- welcome = wm.Init(new Win95Welcome(), "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 ListViewItem("My Computer", 0),
@@ -648,6 +643,30 @@ namespace Histacom2.OS.Win95
{
startmenu.Hide();
}
+
+ private void waitUntil95Loaded_Tick(object sender, EventArgs e)
+ {
+ if (Visible)
+ {
+ //Check if it is the first time
+ if (!CurrentSave.FTime95)
+ {
+ CurrentSave.FTime95 = true;
+ SaveGame();
+ welcome = wm.Init(new Win95Welcome(), "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();
+
+ waitUntil95Loaded.Enabled = false;
+ }
+ }
+ }
}
}