-------------------------------------------------------------------------------
Sample Name: Barcode Generator 

Description: You can generate Bar 29 and Bar 128-styled bar codes of different 
             size, with or without a label, copy them to the clipboard and save 
             them to a file. The converted VB.NET sample works exactly like the 
             original VB6 application, after adding just a few pragmas. It’s a 
             great demonstration of VB Migration Partner’s graphic capabilities.

Download URL: http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=39531&lngWId=1
-------------------------------------------------------------------------------

IMPORTANT NOTE
The first step to ensure that you can migrate the VB6 project to VB.NET is 
loading the original project in the Visual Basic 6 IDE, run it to ensure that 
it works fine, that all the required type libraries are installed, and that all 
file paths are correct. 
Regardless of whether you edited the source code in any way, you should save 
the VB6 project: this save operation ensures that the .vbp file includes  
the correct path and version of referenced type libraries. 
After saving the project, it's usually a good idea to compile the VB6 project
to an executable, to detect any VB6 compilation errors that would appear under 
VB.NET as well. 
(If you don't recompile the project VB Migration Partner will display a warning 
when you later load the project.)


To correctly convert this sample to VB.NET you need to insert the following 
project-level pragmas at the top of any source file (for example, Form1.frm)

	'## project:UseByVal Yes
	'## project:DefaultMemberSupport False

Also, the program references the hDC property of a PictureBox control, therefore 
it is necessary to release the device context handle. You can do it by inserting 
two InsertStatement pragmas, as follows:

1) near the end of the printBar128 method (in Form1.frm)

       Dl = Special_128b(bar, Target.hDc)
       '## InsertStatement Target.ReleasehDC()

2) after the Select Case block in the FileSave method (also in Form1.frm)

    End Select
     '## InsertStatement Picbox.ReleaseHdc()
    Screen.MousePointer = 0
