From 8c59cc05d4da34d41b4c004976a85985a06737d3 Mon Sep 17 00:00:00 2001 From: NYAN CAT Date: Sat, 1 Jun 2019 12:10:51 +0300 Subject: [PATCH] Create it to enable double buffer --- .../Helper/ListviewDoubleBuffer.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 AsyncRAT-C#/AsyncRAT-Sharp/Helper/ListviewDoubleBuffer.cs diff --git a/AsyncRAT-C#/AsyncRAT-Sharp/Helper/ListviewDoubleBuffer.cs b/AsyncRAT-C#/AsyncRAT-Sharp/Helper/ListviewDoubleBuffer.cs new file mode 100644 index 0000000..fa02fd7 --- /dev/null +++ b/AsyncRAT-C#/AsyncRAT-Sharp/Helper/ListviewDoubleBuffer.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace AsyncRAT_Sharp.Helper +{ + public static class ListviewDoubleBuffer + { + public static void Enable(ListView listView) + { + PropertyInfo aProp = typeof(Control).GetProperty("DoubleBuffered", BindingFlags.NonPublic | BindingFlags.Instance); + aProp.SetValue(listView, true, null); + } + } +} \ No newline at end of file