D E L P H I 's Search Engine : FunnyLogo.info : Personal Search Engine Maker of Style Yahoo

 

Web ImagesVideoNewsMapsBooks More»
 
 Advanced Search
 Preferences
 Language Tools


BookMark     Create your own Search Engine Now


FunnyLogo is not affiliated with Google Inc.
Trademarks remain trademarks of their respective companies.
© 2007 FunnyLogo

Sedo - Buy and Sell Domain Names and Websites project info: funnylogo.info Statistics for project funnylogo.info etracker® web controlling instead of log file analysis

Sabtu, 10 November 2007

Hide the window caption

If you want to prevent the user to move a window you have to hide the caption. This is done by changing the window attributes in the FormCreate event. Its also possible to set the property BorderStyle to ‘bsNone’, but than the window has no frame at all.
procedure TForm1.FormCreate(Sender: TObject);
begin
SetWindowLong(Handle, GWL_STYLE, GetWindowLong(Handle,GWL_STYLE) AND
NOT WS_CAPTION);
ClientHeight := Height;
Refresh;
end;


This code is disableing the flag WS_CAPTION in the window attributes.

The SetWindowLong function changes an attribute of the specified window. The function also sets a 32-bit (long) value at the specified offset into the extra window memory of a window.

LONG SetWindowLong(

HWND hWnd, // handle of window
int nIndex, // offset of value to set
LONG dwNewLong // new value
);