--> Switch Function With Left-Click Right-Click Mouse Delphi | Delphi Tips Trick

For Newbie

Tuesday, 15 November 2011

Switch Function With Left-Click Right-Click Mouse Delphi

| Tuesday, 15 November 2011


Swapping function of left click and right click on the mouse with Delphi.

Use the following functions:
switchClick procedure (ok: Boolean);
begin
   if okay then
     / / Click Left to right click and vice versa
     SystemParametersInfo (SPI_SETMOUSEBUTTONSWAP, 1, nil, 0)
   else
     / / Normal
     SystemParametersInfo (SPI_SETMOUSEBUTTONSWAP, 0, nil, 0);
end;

Example of implementation:
TForm1.CheckBox1Click procedure (Sender: TObject);
begin
  switchClick (CheckBox1.Checked);
end;

Related Posts

No comments: