http://www.pinvoke.net에서이 사용 정의를 시도까지 추진됩니다입니다 :
WINDOWPLACEMENT placement;
if (GetWindowPlacement(hWnd, out placement))
{
if ((GetWindowLong(hWnd, GWL_EXSTYLE) & WS_EX_TOOLWINDOW) == 0)
{
var l = GetWindowLong(hWnd, GWL_STYLE);
SetWindowLong(hWnd, GWL_STYLE, (l | WS_MAXIMIZE) & (~WS_MINIMIZE));
var maxPos = placement.MaxPosition;
SetWindowPos(hWnd, IntPtr.Zero, maxPos.X, maxPos.Y, 0, 0, SetWindowPosFlags.AsynchronousWindowPosition | SetWindowPosFlags.DoNotActivate | SetWindowPosFlags.FrameChanged | SetWindowPosFlags.IgnoreResize | SetWindowPosFlags.IgnoreZOrder);
}
}
에게 트릭은 SetWindowLong을 사용하여 윈도우 상태를 변경하고 SetWindowPosFlags.FrameChanged를 사용하여 윈도우 상태를 다시 그리는 것입니다. 그리고 SetWindowPosFlags.DoNotActivate를 사용하면됩니다.
u는 Windows 양식을 최대화하고자 함을 의미합니다. – Sohail