这里指的输入设置主要是扫描枪或者磁条卡刷卡设备
如果仅是IC卡ID卡的,直接设置ReadOnly为True就可以了
根据输入速度判断
OnKeyPress
……………..
if NeedCard and _IsKey then
begin
//
if Edit1.Text = '' then
begin
lctime := GetTickCount;
Timer_input.Enabled := True;
WriteLog('开始');
end
else if (GetTickCount - lctime) > 50 then
//超过50ms 认为是手动输入
begin
Edit1.Text := '';
Key := Chr(0);
WriteLog('手动');
end
else
begin
lctime := GetTickCount;
end;
end;
屏蔽Ctrl+V直接粘贴
OnKeyDown
……………..
if (ssCtrl in Shift) and (Key = Ord('V')) then
begin
if Clipboard.HasFormat(CF_TEXT) then
Clipboard.Clear;
Key := 0;
end;
屏蔽系统右键
OnContextPopUp
begin
Handled:=True;
End;