Einzelnen Beitrag anzeigen

Benutzerbild von toms
toms
(CodeLib-Manager)

Registriert seit: 10. Jun 2002
4.648 Beiträge
 
Delphi XE Professional
 
#4
  Alt 11. Jun 2002, 22:34
Hi,

Dazu musst du einige Nachrichten abfangen:


Code:
type
  TForm1 = class(TForm)
  private
    procedure WMNcrButtonDown(var Msg: TMessage); message WM_NCRBUTTONDOWN;
    procedure WMSyscommand(var Msg: TWMSysCommand); message WM_SYSCOMMAND;
    procedure WMNCLButtonDblClk(var Msg: TMessage); message WM_NCLBUTTONDBLCLK;
  public
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

// Rechte Maustaste auf Titelleiste unterdrücken.
procedure TForm1.WMNcrButtonDown(var Msg: TMessage);
begin
  if Msg.wParam = HTCAPTION then
    Msg.Result := 0;
end;

// Evtl Doppelklick auf App. Icon unterdrücken
procedure TForm1.WMNCLButtonDblClk(var Msg: TMessage);
begin
  if Msg.wParam = HTCAPTION then
    Msg.Result := 0;
end;

// Klick auf App. Icon unterdürcken
procedure TForm1.WMSyscommand(var Msg: TWMSysCommand);
begin
  case (Msg.CmdType and $FFF0) of
    SC_MOUSEMENU:
      Msg.Result := 0;
    else
      inherited;
  end;
end;
Thomas
  Mit Zitat antworten Zitat