测试代码:
var
CtrlDown: Boolean;//定义一个变量来表示ctrl的状态
procedure TForm1.BitBtn1Click(Sender: TObject);
begin
if CtrlDown then //如果已经按下ctrl
showmessage('clicked and ctrl down!')
else //
showmessage('clicked !');
end;
procedure TForm1.BitBtn1MouseDown(Sender: TObject
Button: TMouseButton;
Shift: TShiftState
X, Y: Integer);
begin
CtrlDown:=ssCtrl in shift ;//捕获ctrl状态,设置ctrl状态变量
end;