TIP: Click on subject to list as thread! ANSI
echo: delphi
to: ALL
from: JOAQUIM HOMRIGHAUSEN
date: 1997-10-23 09:26:00
subject: Removing a window`s title bar (Delphi 1.09:26:5610/23/97

Is there a way (in Delphi) to remove a window's title bar?
By using a Windows API call, I can actually enable/disable the title bar, but 
I can't figure out why Delphi (or Windows) doesn't want to update the form's 
frame (and thus show/hide the title bar). If I go to resize the frame 
(window) of the form, the title bar is updated properly to what I would 
expect it to be.
I've tried Invalidate, Repaint, Update, and Refresh - none of these seem to 
want to do anything with it. The Windows code I'm using is:
PROCEDURE TMainForm.FormDblClick(Sender: TObject);
VAR
  LongVal :LONGINT;
BEGIN
  LongVal:=GetWindowLong(Handle, GWL_STYLE);
  LongVal:=Longval XOR ws_Caption;
  SetWindowLong(Handle, GWL_STYLE, LongVal);
  Refresh;
END;
What am I doing wrong.. ?
            %JoHo%
            joho@defsol.se
---
---------------
* Origin: Definite Solutions ~/Stockholm, Sweden (2:201/330.3)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.