none
Using a Barcode Scanner in VFP Apps

    Question

  • Hello Experts,

    I am new to Barcode functionality in my VFP Apps.

     

    I have everything else going except now the client needs to introduce Barcode functionality, like the functionality in any Point-Of-Sales Apps.

    I would like help as to how I need to implement this logic into my apps.

     

    The Client has a CCD Barcode reader (ACan) from his old Application and does not want to replace it.

     

    Moreover, He does not know what barcode font it uses (Do we need to know it!) and he states that it reads all Barcode labels. He also prints his own Barcode Labels through his previous Apps, which will be required to be replicated in my apps too.

    I have seen a lot of Vfp Barcode programs out there but have never got a complete picture of its implementation.

     

    Any guidance, help or tutorials will be of great help.

    I also need to test this functionality, what Device do I need to a purchase.

     

    Regards

     

    Stanley

    Thursday, March 31, 2011 3:04 PM

Answers

  • HI Dev Papa.

    I use a font called free3of9 (just google it). it is free to use as long as you distribute the license info with your apps. All barcode readers can read it so you can use it to print labels, etc. A barcode reader just translates the barcode to keystrokes so when you scan something, the computer automatically "types in" the characters/numbers that are on the barcode. It is very simple to do.


    Mike z
    Thursday, March 31, 2011 3:25 PM
  • The barcode scanner will have the option to send a carriage return or not so it is taken care of on the barcode reader itself. I am not aware of any way to "turn off" the barcode reader. You can think of it as an extra keyboard that just reads barcodes. To stay in the same field, you would use "return 0" in the valid clause after you have done whatever you wish to do. ie. calculate totals, etc.
    Mike z
    Thursday, March 31, 2011 3:57 PM
  • The font in textbox is not important in first steps. Just scan a label and you will have the text in textbox...
    dni
    Thursday, March 31, 2011 4:00 PM

All replies

  • HI Dev Papa.

    I use a font called free3of9 (just google it). it is free to use as long as you distribute the license info with your apps. All barcode readers can read it so you can use it to print labels, etc. A barcode reader just translates the barcode to keystrokes so when you scan something, the computer automatically "types in" the characters/numbers that are on the barcode. It is very simple to do.


    Mike z
    Thursday, March 31, 2011 3:25 PM
  • Hello Mike,

    Thanks for your response. With it I now know the first Step. and the last, is means I can purchase any scanner and it will be able to read this free3of9 font. Perfect.

    Now coming to the implementation. (Please correct me where I am wrong)

    I will have a text box to handle the input from the Barcode. (And the font Name of this textbox is going to be free3of9)

    1) what input mask do I need for the text box so that it jumps after receiving this Barcode->Alpha/Number from the reader.

    2) What happens when the input is read. Do I need to add additional (Chars) to make the TextBox lose focus and then do the validation. How to do this.

        Or do I set the scanner to do it (Can this be done on the scanner (Hadware/Software Driver) level.

    3) After validation, I will need to set focus to the textbox again, I presume to carry out the same operation.

    4) What Happens if I am on any other TextBox field and use the Barcode, which I dont want to happen, how will I stop it from reading. (Does the Fontname drive this functionailty). In other words, I want only one particular textbox hooked to the scanner and nothing else.

    5) Any sample code will be of great help in understanding the flow of events.

     

    Thanks again

     

    Stanley




    Thursday, March 31, 2011 3:50 PM
  • The barcode scanner will have the option to send a carriage return or not so it is taken care of on the barcode reader itself. I am not aware of any way to "turn off" the barcode reader. You can think of it as an extra keyboard that just reads barcodes. To stay in the same field, you would use "return 0" in the valid clause after you have done whatever you wish to do. ie. calculate totals, etc.
    Mike z
    Thursday, March 31, 2011 3:57 PM
  • The font in textbox is not important in first steps. Just scan a label and you will have the text in textbox...
    dni
    Thursday, March 31, 2011 4:00 PM
  • DNI is correct, you will use the barcode font for your labels
    Mike z
    Thursday, March 31, 2011 4:03 PM
  • DNI,

    Do You mean, the use of the Bar-code Font is only while doing the reverse (Number to Barcode font ->Print Labels)?

    Stanley

    Thursday, March 31, 2011 4:49 PM
  • Mike, 

    I think I have a fair idea of what to do. 

    Can you suggest the name of a cheap yet popular Barcode device to get me get started. 

    Will revert back if I have any problems.

    Thank you for your help

    Stanley

    Thursday, March 31, 2011 4:52 PM
  • Correct. A barcode is just a font. If you look at a can of drinks, you will see a barcode and numbers underneath the barcode. These numbers are the barcode (99% of the time). In your application, you will want to sometimes type in an item# or scan a barcode in your field. So, when you scan a barcode in your field, you will actually see the item numbers for that barcode. That also means that your item file will contain a field for the barcodes. You/your client can populate this field by scanning in there items.
    Mike z
    Thursday, March 31, 2011 4:56 PM
  • Yes, a bar code font(like CODE 39 or others) is to print your bar code labels. This type of font( in labels) can be also red by your device and converted in characters in your textbox. You may check (for details):

    http://www.adams1.com/fonts.html

     


    dni


    Thursday, March 31, 2011 4:58 PM
  • I always use a metrologic 9540 (USB version)
    Mike z
    Thursday, March 31, 2011 4:58 PM
  • Hi Stanley,

    if you want to ommit fonts, you could use 'FoxBarcode' from VFPX.

    http://vfpx.codeplex.com/wikipage?title=FoxBarcode&referringTitle=Home

    it generates bitmaps that you can place in your reports.


    Gruss / Best regards -Tom 010101100100011001010000011110000101001001101111011000110110101101110011
    Friday, April 01, 2011 6:42 AM
    Answerer
  • Hi Stanly,

     

    Any update?

     

    How about your program? If it works, you can share your solutions & experience here, it will be very beneficial for other community members who have similar questions. Thanks.

     

    Best regards,


    Mike Feng [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, April 04, 2011 11:09 AM
    Moderator
  • Hello Mike,

    I am working on this and as soon as resolve this issue, I will put the whole code behind it on the Openforum, within a new thread.

    Thank you

    Wednesday, April 06, 2011 6:12 PM
  • This looks good. 

    Thanks

    Wednesday, April 06, 2011 6:13 PM
  • Hi Stanley,

     

    Thanks for posting in the MSDN Forum.

     

    Any update? I have marked Michael and Dni's reply as answer, if you think it provides no help, please unmark it, and  feel free to let me know your any concerns.

    By the other hand, I will appreciate you to show your whole solution, that is very benifit to the community members.

     

    Thank you for your understanding and support.

     

    Best Regards,


    Mike Feng [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, April 12, 2011 3:13 AM
    Moderator