恢复标题栏问题(50分)

  • 主题发起人 主题发起人 coolbaby
  • 开始时间 开始时间
C

coolbaby

Unregistered / Unconfirmed
GUEST, unregistred user!
大家都知道如下代码可以实现隐藏标题栏<br>如何恢复标题栏呢?<br>procedure TForm1.Button1Click(Sender: TObject);<br>begin<br>&nbsp; &nbsp; SetWindowLong(Handle, GWL_STYLE,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GetWindowLong(Handle, GWL_STYLE) and not WS_CAPTION);<br>&nbsp; &nbsp; ClientHeight := Height;<br>end;<br><br>procedure TForm1.Button2Click(Sender: TObject);<br>begin<br>&nbsp; &nbsp; SetWindowLong(Handle, GWL_STYLE,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GetWindowLong(Handle, GWL_STYLE) and WS_CAPTION);<br>&nbsp; &nbsp; application.BringToFront;<br><br>end;
 
[BLUE]procedure TForm1.Button1Click(Sender: TObject);<br>begin<br>&nbsp; &nbsp; SetWindowLong(Handle, GWL_STYLE,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GetWindowLong(Handle, GWL_STYLE) and not WS_CAPTION);<br>&nbsp; &nbsp; ClientHeight := Height;<br>end;<br>procedure TForm1.Button2Click(Sender: TObject);<br>begin<br>&nbsp; SetWindowLong(Handle,GWL_STYLE,GetWindowLong(Handle,GWL_STYLE) or (WS_CAPTION));<br>&nbsp; Height:=ClientHeight;<br>&nbsp; Width:=ClientWidth;<br>end;[/BLUE]
 
多人接受答案了。
 
后退
顶部