Basically, there are two types of barcode scanners:
- with USB, PS2 interface,
- with RS232C interface.
In the first case the scanner works just like an additional keyboard for your PC, so you can set the focus in a text box and it will be filled with the string form the scanner automatically after scanning. Then just read the .Text property of the text box to precess it in your code.
In the second case, you need to use MSComm control to read the string via serial interface. There is plenty of examples for the MSComm on the Net.