mirror of
https://github.com/n00mkrad/flowframes.git
synced 2025-12-16 16:37:48 +01:00
26 lines
608 B
C#
26 lines
608 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
|
|
namespace Flowframes.UI
|
|
{
|
|
public static class ControlExtensions
|
|
{
|
|
[System.Runtime.InteropServices.DllImport("user32.dll")]
|
|
public static extern bool LockWindowUpdate(IntPtr hWndLock);
|
|
|
|
public static void Suspend(this Control control)
|
|
{
|
|
LockWindowUpdate(control.Handle);
|
|
}
|
|
|
|
public static void Resume(this Control control)
|
|
{
|
|
LockWindowUpdate(IntPtr.Zero);
|
|
}
|
|
}
|
|
}
|