As I understand, you want to print the barcode in an invoice and the barcode will be the invoice ID. This I believe is relatively easy.
There are a lot of articles about how to read/write barcodes.
You can implement your own code to generate a barcode or you can use a library for that.
If you want to use a library, you can use either a commercial library or a free library.
I worked on a solution a while back that used a library called leadtools that was easy to use and fast.
I found the following links that I think might help you.
Barcode Image Generation Library
Write barcode tutorial
SourceForge barcode library