-------------------------------------------------------------------------------
Sample Name: Type-N-Sign

Description: A nice application that teaches you the sign language. It uses 
             Windows API methods to create a transparent, non-rectangular form 
             and has a few other challenges, but VB Migration Partner is quite 
             able to handle it, after adding a couple pragmas. The converted 
             VB.NET application works exactly like the original one, but you 
             might want to adjust its fonts and graphical appearance after the 
             migration. 

Download URL: http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=21921&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.)


You need three pragmas and a minor code change to convert this application to VB.NET.

1) the program stores images on file. Add this pragma at the top of the Module1.bas 
file to have these images included in the VB.NET project:

	'## AddDataFile sign\*

2) the program has a splash screen. To have it work well after the migration to 
VB.NET, add the following InsertStatement pragma at the top of the Sub Main method 
(in Module1.bas)

	Sub Main()
		'## InsertStatement If InitializeFormChaining6() Then Exit Sub

3) the frmMain.frm form contains a Label control named Exit, which is a reserved 
VB.NET word. You can change its name by adding the following pragma at the top of 
the form file:

	'## Exit.SetName lblExit

4) the code in the GetFromINI method (in Module1.bas) invokes the 
GetPrivateProfileString API function and passes it result to the Left function. 
This code doesn't work in VB.NET because the order in which method arguments are 
evaluated is different. (See http://www.vbmigration.com/detknowledgebase.aspx?Id=52 
for more info.). Here's how you should edit the original VB6 code to have it work 
correctly after the conversion to .NET:

    '## NOTE : WAS GetFromINI$ = Left(strBuffer, GetPrivateProfileString(Section$, ByVal Key$, "", strBuffer, Len(strBuffer), Directory$))
    Dim length As Integer
    length = GetPrivateProfileString(Section$, ByVal Key$, "", strBuffer, Len(strBuffer), Directory$)
    GetFromINI$ = Left(strBuffer, length)
