Made small changes to try and minimize flicker in treeview and binary value editor

This commit is contained in:
StingRaptor 2016-02-08 12:54:23 +01:00
parent d59ee13dff
commit 0ab4b251ac
4 changed files with 24 additions and 3 deletions

View File

@ -1252,7 +1252,7 @@ namespace xServer.Controls.HexEditor
SetStyle(ControlStyles.ResizeRedraw, true);
//Enable double buffering
SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint, true);
//Enable selectable
SetStyle(ControlStyles.Selectable, true);

View File

@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace xServer.Controls
{
public class RegistryTreeView : TreeView
{
public RegistryTreeView()
{
//Enable double buffering and ignore WM_ERASEBKGND to reduce flicker
SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint, true);
}
}
}

View File

@ -32,7 +32,7 @@
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmRegistryEditor));
this.tableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();
this.splitContainer = new System.Windows.Forms.SplitContainer();
this.tvRegistryDirectory = new System.Windows.Forms.TreeView();
this.tvRegistryDirectory = new Controls.RegistryTreeView();
this.imageRegistryDirectoryList = new System.Windows.Forms.ImageList(this.components);
this.imageRegistryKeyTypeList = new System.Windows.Forms.ImageList(this.components);
this.statusStrip = new System.Windows.Forms.StatusStrip();
@ -649,7 +649,7 @@
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel;
private System.Windows.Forms.SplitContainer splitContainer;
private System.Windows.Forms.TreeView tvRegistryDirectory;
private Controls.RegistryTreeView tvRegistryDirectory;
private Controls.AeroListView lstRegistryKeys;
private System.Windows.Forms.StatusStrip statusStrip;
private System.Windows.Forms.ToolStripStatusLabel selectedStripStatusLabel;

View File

@ -84,6 +84,9 @@
<Compile Include="Controls\RapidPictureBox.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Controls\RegistryTreeView.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Controls\RegistryValueLstItem.cs" />
<Compile Include="Core\Build\IconInjector.cs" />
<Compile Include="Core\Commands\RegistryHandler.cs" />