procedure TForm1.Button1Click(Sender: TObject);<br>var<br> wp: TWindowPlacement;<br>begin<br> ShowWindow(Handle, SW_SHOWMAXIMIZED);<br> FillChar(wp, SizeOf(wp), 0);<br> if GetWindowPlacement(Handle, @wp) then<br> begin<br> ShowMessage(IntToStr(wp.showCmd));<br> end;<br>end;<br>