Connecting barcode device using an OCX

angelotkangelotk Member Posts: 12
Hello,

I have a barcode device connected to COM2 port and I would like to send and receive data from it.

I have a visual basic example wich works great with a OCX.However, when I use this OCX in Navision, I can't have the events(like the events DataArrived which tells when something is put in the device)because it's a OCX.

Does anyone knows how can I procede to sent data to this device and receive data when something is put in this device?

Thks everyone

Comments

  • lubostlubost Member Posts: 628
    You have to create an automation (DLL), which will catch the events from your OCX and will fire own events.
  • kinekine Member Posts: 12,562
    There are many ways how to do that. But for example I created small .exe tool which is able to convert the data sent to COM port into keystrokes (it change the COM scanner into "Keyboard" scanner) or it will just simulate keystroke "Ctrl+F12" and I catch this event through hidden Menu Button and through calling function of this automation I receive the data...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.