diff options
| author | Michael Webb <[email protected]> | 2019-04-06 14:06:57 -0500 |
|---|---|---|
| committer | Michael Webb <[email protected]> | 2019-04-06 14:06:57 -0500 |
| commit | 3f3c2087d86d0a3a26d6878557c6e37a3e4b625d (patch) | |
| tree | 661475d3909c9c8886f81fc2cbaee2a60fc4ff45 /Histacom2/OS/WinXPBad/WinXPBad.cs | |
| parent | 7a17bdcb24e580a357bb1f9b8a925315eac33e64 (diff) | |
| download | histacom2-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/WinXPBad/WinXPBad.cs')
| -rw-r--r-- | Histacom2/OS/WinXPBad/WinXPBad.cs | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/Histacom2/OS/WinXPBad/WinXPBad.cs b/Histacom2/OS/WinXPBad/WinXPBad.cs index cf49e15..61c69e1 100644 --- a/Histacom2/OS/WinXPBad/WinXPBad.cs +++ b/Histacom2/OS/WinXPBad/WinXPBad.cs @@ -13,6 +13,7 @@ using static Histacom2.Engine.SaveSystem; using Histacom2.OS.Win98.Win98Apps; using Histacom2.GlobalPrograms; using Histacom2.OS.WinXPBad.Story; +using System.Threading.Tasks; namespace Histacom2.OS.WinXPBad { @@ -24,6 +25,17 @@ namespace Histacom2.OS.WinXPBad public TaskBarController tb = new TaskBarController(); public int currentappcount = 0; + + // 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 WindowsXPBad() @@ -76,8 +88,6 @@ namespace Histacom2.OS.WinXPBad lv.Position = new Point(20, 20); desktopicons.Invalidate(); //DesktopController.RefreshDesktopIcons(new ListViewItem[] { new System.Windows.Forms.ListViewItem("Recycle Bin", 7) }, ref desktopicons, Path.Combine(ProfileWindowsDirectory, "Desktop")); - - Hack4.StartObjective(); } private void fontLoad() @@ -290,6 +300,15 @@ namespace Histacom2.OS.WinXPBad startbutton.Enabled = false; clockTimer.Enabled = false; } + + private void waitUntilLoaded_Tick(object sender, EventArgs e) + { + if (Visible) + { + Hack4.StartObjective(); + waitUntilLoaded.Enabled = false; + } + } } } |
