Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Barcode Application

bmattubmattu Member Posts: 1
Hi

I have a hand held barcode reader. I would like to develop a delphi application that will interface to this barcode reader. After a Barcode is read to an edit box how do you simulate the Enter key.

My problem is I don't have a clue how a barcode application will work.

Can someone send me a sample barcode application or give a link to web site where I can find a sample application.

Thanks for your help
Victor

Comments

  • zibadianzibadian Member Posts: 6,349
    : Hi
    :
    : I have a hand held barcode reader. I would like to develop a delphi application that will interface to this barcode reader. After a Barcode is read to an edit box how do you simulate the Enter key.
    :
    : My problem is I don't have a clue how a barcode application will work.
    :
    : Can someone send me a sample barcode application or give a link to web site where I can find a sample application.
    :
    : Thanks for your help
    : Victor
    :
    I don't know how a barcode application works either, but I do know how to send an enter to a control. (Untested)
    [code]
    SendMessage(Edit1.Handle, WM_KeyUp, VK_ENTER, 0);
    [/code]
    See the help on WM_KeyUp for more info.
    But why don't you just use the value read into the edit box in the same procedure. This way you don't need to send an enter to the edit box. I think this might be somewhat unclearly written, so here it is in pseudo code.
    [code]
    procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
    begin
    if Key = #13 {Enter} then begin
    { Use barcode }
    end;
    end;

    procedure NewBarCode;
    begin
    { Read the bar code from the reader into the editbox }
    Form1.Edit1KeyPress(nil, #13); // Simulate enter-key without messages
    end;
    [/code]
  • DebianDebian Member Posts: 9
    : Hi
    :
    : I have a hand held barcode reader. I would like to develop a delphi application that will interface to this barcode reader. After a Barcode is read to an edit box how do you simulate the Enter key.
    :
    : My problem is I don't have a clue how a barcode application will work.
    :
    : Can someone send me a sample barcode application or give a link to web site where I can find a sample application.
    :
    : Thanks for your help
    : Victor
    :

    If you use the barcode reader device that connect to PC by keyboard interface, it normally give you the Enter key (Chr(13)) after successfully read 1 barcode. You can use the events OnkeyPress of editbox to get the Enter key (Chr(13)) and then you can do what ever you want from this barcode.

    Below is the small example
    ////

    procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
    begin
    if Key = Chr(13) then
    // do what ever you want //
    end;

    ////
    From my point of view, before you scan barcode you have to get each barcode detail and save to Database or textfile. Then after you scan that barcode, you just make a barcode searching from Database or textfile.

    Hope this may help.
    Sorry about my english. :)
  • Chris BrownChris Brown USAMember Posts: 4,624 ✭✭

    ____ < http://forcoder.org /> free ebooks and video tutorials about ( MATLAB Delphi Scratch Visual Basic Visual Basic .NET C# Assembly PL/SQL C JavaScript Ruby Swift Java Perl Python R Go Objective-C PHP C++ Scala D Logo Lua SAS Prolog Awk Bash Kotlin Clojure Ada Lisp Erlang LabVIEW ML VBScript ABAP Apex Hack Dart FoxPro Julia Crystal Rust Alice COBOL Fortran Scheme Transact-SQL F# ) _____________

Sign In or Register to comment.