Skip to content

Commit

Permalink
Added full application double buffering - decreases performance
Browse files Browse the repository at this point in the history
  • Loading branch information
WithoutCaps committed Jun 22, 2017
1 parent 111022f commit 41de414
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions LimitlessUI/Form_WOC.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public enum LinePositions
private List<Line> _lines = new List<Line>();
private int _gripSize = 10; // Thickness of form grip which allows you to resize it
private bool _drawShadow = true;
private bool _formLevelBuffering = true;

private const int
HTLEFT = 10,
Expand All @@ -65,18 +66,16 @@ private const int
HTBOTTOMLEFT = 16,
HTBOTTOMRIGHT = 17;



protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
if (_drawShadow)
{
const int CS_DROPSHADOW = 0x20000;
cp.ClassStyle |= CS_DROPSHADOW;
}
cp.ClassStyle |= 0x20000;
if (_formLevelBuffering && !DesignMode)
cp.ExStyle |= 0x02000000;

return cp;
}
}
Expand Down Expand Up @@ -143,6 +142,12 @@ public bool DrawShadow
}


public bool BufferApplication
{
get { return _formLevelBuffering; }
set { _formLevelBuffering = value; }
}

class Line
{
private int _x1;
Expand Down

0 comments on commit 41de414

Please sign in to comment.