Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Library: Sonstiges (https://www.delphipraxis.net/45-library-sonstiges/)
-   -   Mausspur (de)aktivieren (https://www.delphipraxis.net/70839-mausspur-de-aktivieren.html)

fkerber 5. Jun 2006 16:09


Mausspur (de)aktivieren
 
Hi!

turboPASCAL hat hier eine einfache Möglichkeit vorgestellt, wie man die Mausspur an- bzw. ausschaltet:

Delphi-Quellcode:
// Die Function SystemParametersInfo() gibts in der Unit Windows.
uses
  Windows,...


function SetMouseTrail(const MouseTrailState: Boolean): Boolean;
var State: Byte;
begin
  if MouseTrailState then State := succ(1) else State := pred(1);

  Result := SystemParametersInfo(SPI_SETMOUSETRAILS, State, nil, 0);
end;
Aufgerufen wird das Ganze bspw. so:
Delphi-Quellcode:
procedure TFormX.CheckBox1Click(Sender: TObject);
begin
  SetMouseTrail(CheckBox1.Checked);
end;

Ciao Frederic


Alle Zeitangaben in WEZ +1. Es ist jetzt 10:40 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz