شاشة قارئ الباركود و عرض المعلومات.
#8
PHP كود :
unit Unit1;

interface

uses
  Winapi
.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs;

type
  TForm1 
= class(TForm)
    procedure FormKeyPress(Sender: TObject; var Key: Char);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
    EnteredBarcode: string;
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
begin
 Self
.KeyPreview:= True;
end;

procedure TForm1.FormKeyPress(Sender: TObject; var Key: Char);
begin
 
if Key = #13 then
  begin
   Key
:= #0;
    if Trim(EnteredBarcode) <> '' then
     begin
       ShowMessage
('Go and find Item with ' + EnteredBarcode);
       EnteredBarcode:= '';
     end;
  end
  
else
  begin
    EnteredBarcode
:= EnteredBarcode+ Key;
    Key:= #0;
  end;
end;

end. 
[-] كل من 2 users say قال شكرا ل justnick على المشاركة المفيدة
  • أبو معاذ, bassem_43
الرد


الردود في هذا الموضوع
RE: شاشة قارئ الباركود و عرض المعلومات. - بواسطة justnick - 01-07-2025, 12:54 PM

التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم