From a8474b0a177e38752a45cf0a71b680a30a13debe Mon Sep 17 00:00:00 2001 From: "andres.delikat" Date: Sun, 6 Mar 2011 21:41:41 +0000 Subject: [PATCH] Hex Editor - reduce flickering by creating a custom control for the memory viewer and setting useful flags --- .../BizHawk.MultiClient.csproj | 4 ++++ .../tools/HexEditor.Designer.cs | 6 +++--- BizHawk.MultiClient/tools/MemoryViewer.cs | 19 +++++++++++++++++++ 3 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 BizHawk.MultiClient/tools/MemoryViewer.cs diff --git a/BizHawk.MultiClient/BizHawk.MultiClient.csproj b/BizHawk.MultiClient/BizHawk.MultiClient.csproj index c6e0120a5e..5dae115f79 100644 --- a/BizHawk.MultiClient/BizHawk.MultiClient.csproj +++ b/BizHawk.MultiClient/BizHawk.MultiClient.csproj @@ -35,6 +35,7 @@ prompt 4 x86 + true @@ -200,6 +201,9 @@ LuaWindow.cs + + Component + Form diff --git a/BizHawk.MultiClient/tools/HexEditor.Designer.cs b/BizHawk.MultiClient/tools/HexEditor.Designer.cs index c3ed07f6cc..cef272ea71 100644 --- a/BizHawk.MultiClient/tools/HexEditor.Designer.cs +++ b/BizHawk.MultiClient/tools/HexEditor.Designer.cs @@ -28,7 +28,7 @@ /// private void InitializeComponent() { - this.MemoryViewer = new System.Windows.Forms.GroupBox(); + this.MemoryViewer = new MemoryViewer(); this.menuStrip1 = new System.Windows.Forms.MenuStrip(); this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.dumpToFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -194,8 +194,8 @@ } #endregion - - private System.Windows.Forms.GroupBox MemoryViewer; + + private MemoryViewer MemoryViewer; private System.Windows.Forms.MenuStrip menuStrip1; private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem dumpToFileToolStripMenuItem; diff --git a/BizHawk.MultiClient/tools/MemoryViewer.cs b/BizHawk.MultiClient/tools/MemoryViewer.cs new file mode 100644 index 0000000000..d65a3dbb45 --- /dev/null +++ b/BizHawk.MultiClient/tools/MemoryViewer.cs @@ -0,0 +1,19 @@ +using System; +using System.Windows.Forms; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace BizHawk.MultiClient +{ + public class MemoryViewer : GroupBox + { + public MemoryViewer() + { + SetStyle(ControlStyles.AllPaintingInWmPaint, true); + SetStyle(ControlStyles.UserPaint, true); + SetStyle(ControlStyles.DoubleBuffer, true); + //SetStyle(ControlStyles.Opaque, true); + } + } +}