Mastodon
Programmierung

Dragging a form with no titlebar

[code lang=”delphi”]// Declare the procedure
procedure WMCHitTest(var msg : TMessage); message WM_NCHITTEST;

procedure TForm1.WMCHitTest(var msg : TMessage);
begin
inherited;
// If the client (form) recieved a “mousedown” event
// then we process it and let Windows think we
// clicked on the titlebar.
If msg.Result = htClient Then
msg.Result := htCaption;
end;
[/code]

[tags]Delphi, Forms[/tags]

0 Kommentare zu “Dragging a form with no titlebar

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht.