-
Notifications
You must be signed in to change notification settings - Fork 1
/
StripListView.cs
36 lines (32 loc) · 1.08 KB
/
StripListView.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
//+--------------------------------------------------------------------------
//
// NightDriver.Net - (c) 2019 Dave Plummer. All Rights Reserved.
//
// File: StripListView.cs
//
// Description:
//
// Specialization of the listview for use in showing the main strip list.
//
// History: Dec-23-2023 Davepl Created
//
//---------------------------------------------------------------------------
namespace NightDriver
{
internal class StripListView : ListView
{
public StripListView()
{
// Activate double buffering
this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint, true);
// Enable notify messages so we get a shot at WM_ERASEBKGND
this.SetStyle(ControlStyles.EnableNotifyMessage, true);
}
protected override void OnNotifyMessage(Message m)
{
// Eat the WM_ERASEBKGND message for cleaner painting with less flicker, like Task Manager :-)
if (m.Msg != 0x14)
base.OnNotifyMessage(m);
}
}
}