You can try this:
[Flags]
public enum SWP
{
SWP_ASYNCWINDOWPOS = 0x4000,
SWP_DEFERERASE = 0x2000,
SWP_DRAWFRAME = 0x20,
SWP_FRAMECHANGED = 0x20,
SWP_HIDEWINDOW = 0x80,
SWP_NOACTIVATE = 0x10,
SWP_NOCOPYBITS = 0x100,
SWP_NOMOVE = 2,
SWP_NOOWNERZORDER = 0x200,
SWP_NOREDRAW = 8,
SWP_NOREPOSITION = 0x200,
SWP_NOSENDCHANGING = 0x400,
SWP_NOSIZE = 1,
SWP_NOZORDER = 4,
SWP_REDRAWONLY = 0x717,
SWP_SHOWWINDOW = 0x40
}
[DllImport("User32.dll", CharSet=CharSet.Auto)]
public static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int X, int Y, int cx, int cy, int uFlags);
private static SWP hideFlags = SWP_NOSIZE | SWP_NOMOVE | SWP_NOZORDER | SWP_NOREDRAW | SWP_HIDEWINDOW
// Put this in your code instead of ShowWindowAsync
SetWindowPos(p.MainWindowHandle, IntPtr.Zero, 0, 0, 0, 0, hideFlags);
More info on MSDN[^]. Hope this works! :cool:
"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.." -- Mark McCormick