本文整理自网络,侵删。
条码枪的原理其实很简单,就是一个仿键盘输入的机器。放上一个Edit元件,接著setfocus后在edit的keypress检查enter(#13)就行了
procedure TForm1.EdtBarcodeKeyPress(Sender: TObject; var Key: Char);begin if key=#13 then begin // 处理EdtBarcode内容(就是刷到的条码) end;end;
相关阅读 >>
Delphi 利用hook api函数openprocess与terminateprocess来防止任务管理器结束进程
更多相关阅读请进入《Delphi》频道 >>