If you have a keyboard wedge scanner you do not have to code anything.
A keyboard wedge scanner plugs directly into your keyboard and all it does it emulate normal keypresses. Barcodes are simply a string of alpha-numeric characters.
So if you have a keyboard wedge scanner plugged in, and the focus on the screen is in a control that can receive text, such as a word document, or a field on a form, etc... then when you scan a barcode it will appear inside the control.
Note that you may or may not have to alter some settings of your scanner (see that particular manual), but most scanners, right out of the box, will be able to scan any barcode (like the one on a can of soda, or a software package) into notepad without setting up or coding anything!
Of course if you have a serial port scanner the above is all irrelevant, you will need to code something or use a program such as BC-Wedge to translate the serial data into simulated key presses...