TIP: Click on subject to list as thread! ANSI
echo: delphi
to: JOAQUIM HOMRIGHAUSEN
from: MARTIN MAAT
date: 1997-10-27 09:20:00
subject: Removing a window`s title bar (Delphi 1.09:20:4910/27/97

Hello Joaquim.
 JH> Is there a way (in Delphi) to remove a window's title bar?
You need to override the CreateParams method:
procedure TfrmMain.CreateParams(var Params: TCreateParams);
begin
{
  TCreateParams = record
    Caption        : PChar  ;
    Style          : Longint;      // CreateWindow
    ExStyle        : Longint;      // CreateWindowEx
    X, Y           : Integer;
    Width, Height  : Integer;
    WndParent      : HWND   ;
    Param          : Pointer;
    WindowClass    : TWndClass;
    WinClassName   : array[0..63] of Char;
  end;
}
  inherited CreateParams(Params);
  with Params do
  begin
    // modify Window creation parameters
    Style := Style or WS_HSCROLL;
 end;
end;
The example above inserts a horizontal scrollbar. You would still have to 
handle messages to make it work though. For new styles, modify ExStyle. Check 
out CreateWindow and CreateWindowEx in Windows API help for a list of 
parameters and their meaning.
You're not writing a Fido mailer for Windows by any chance, are you? Perhaps 
you would want the window to dock in the tray of the task bar for quick 
configuration purposes. I don't how to do that. I thought it was an ExStyle 
but it isn't.
Groeten, Martin.
--- FMail/Win32 1.22
---------------
* Origin: -=[ E-mail: m_maat@knoware.nl .......... ]=- (2:286/420.1)

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™.