Уже готовое решение в поисковике есть, вставляешь это
[DllImport("user32.dll")]
private static extern int SetWindowLong(IntPtr window, int index, int value);
[DllImport("user32.dll")]
private static extern int GetWindowLong(IntPtr window, int index);
private const int GWL_EXSTYLE = -20...