Используйте GetWindowLong , чтобы получить стиль окна, замаскируйте биты WS_CAPTION
и затем установите обновленный стиль, используя SetWindowLong :
var style = GetWindowLong(_hWnd, GWL_STYLE);
SetWindowLong(_hWnd, GWL_STYLE, style & ~WS_CAPTION);
и со следующим кодом помощника:
const int GWL_STYLE = -16;
const int WS_CAPTION = 0x00C00000;
[DllImport ("user32")]
private static extern int GetWindowLong(System.IntPtr hwnd, int nIndex);
[DllImport ("user32")]
private static extern int SetWindowLong(System.IntPtr hwnd, int index, int newLong);