Tuesday, 15 November 2011
Home »
Tips and Trick Delphi
» Switch Function With Left-Click Right-Click Mouse Delphi
Switch Function With Left-Click Right-Click Mouse Delphi
To Share | 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;
No comments:
Post a Comment