Hello! Help with the dilemma. How can a Delphi program insert symbols removed from a card using a tape reader?

More precisely: Edith - is hidden, and there is still a timer. For example, if there is, say, 8 characters in the food, then check them in the database, if there is a similarity to output the line to the label, if not - wait for the input.

  • Hmpf. Read the manual for the device and the document to the driver. Then read the data and insert into edit = D - Alexey Sonkin
  • or rather you can - Programer
  • What a question, and the answer. Well, make one visible if necessary. If there is a similarity to something with something, output to the label =) - Alexey Sonkin
  • Okay. I work with touchscreen. Instead of a keyboard, a keypad reader. I need that in the first window of the program the pointer is always in the food or when entering information it is always recorded in the edit! - Programer
  • Those. Does your card reader work as a HID device? - Dex

2 answers 2

For example, if in food there are 8 characters, then check them in the database, if there is a similarity, print a line to the label, if not, wait for the input.

Override OnKeyPress for your Edit and check there:

  1. on the sufficiency of the number of characters entered;
  2. if characters are enough - search in the database;
  3. if there are characters whose input is necessary to prevent - you can compare the input with the template and if the character is prohibited, then ignore its input
  4. etc.

    I understand that this is a terminal machine? ) Then it is best to install a hook (if a HID card reader) or it can be a com port, then we smoke docks to the card reader and read the data from the port, and disable the standard shel (replace explorer with your software). Next, you do not need edith, store data in rows (especially if you receive it through a hook). There are some good things about hooks with examples on DRKB.ru.

    Checking card readers is not the length, and the symbol # 13, because they all complete their input (in the case of HID). If you have additional questions, please contact Skype (torch565), there is a software that works with magnetic cards and barcode readers, I’ll share it with you.