vb2Py

 

Help for Online Converter


QuickLinks

User Guide

 

VB keywords

VB control structures

Subroutines and Functions

Classes

Error Handling


 
  Home
  News
  Downloads
  Documentation
  Screenshots
  Online Version
  Links
  Contribute

Here are some typical questions, problems and resolutions for using the online version of the code converter.

1. My form wont translate - I get a parsing error
2. What does the context mean?
3. I posted VB.NET code and it didn't work
4. I get "ordinal not in range" or other Unicode type errors

 

 

1. My form wont translate - I get a parsing error

The most likely cause is that you also posted form layout information in the text box. The online version of vb2Py doesn't handle layouts so you can only paste the code portion of the .frm file.

You can identify the layout portion as that section at the head of the file which is between the Begin VB.Form and its corresponding End statement.

2. What does the context mean?

The context sets the kind of file that the code originally came from. When you run the full version of vb2Py then it reads files directly so it knows when code comes from a form, class or code module and can convert accordingly. In the online version there is no such information so you need to tell it.

The main difference between the three types is that class and form modules get converted to a single Python class whereas code modules get converted to a series of functions. Form and class modules differ slightly in the default data hiding approach.

3. I posted VB.NET code and it didn't work

VB.NET is similar to VB6/VBA but also different in significant ways. Much VB.NET code will actually convert but Classes will almost always cause a parsing error because the Class definition is explicit in VB.NET and this is a syntax error in VB6.

For the time-being the only way aroud this is to try to cut out those sections of your VB.NET file that would fail in VB6.

4. I get "ordinal not in range" or other Unicode type errors

The converter currently does not support unicode text and will fail in many ways if you paste non-ASCII characters. Unfortunately this will take some time to fix and there isn't a workaround other than replacing all the characters with some ASCII character.

Note that this restriction is true of the full version also.

    SourceForge.net Logo