|
|
|
|
|
|
|
|
|
Using VB Converter |
|
|
|
During installation, VB Converter will be installed as an Add-In to Visual Basic 5 or 6. When running VB the VB Converter toolbar is displayed which give you access to its functionality within the VB environment. VB Converter can also be run from the command-line for converting VB 3 and VB 4 projects or for adding to a DOS command script. The command-line syntax is:
VB Converter Add-In Toolbar ButtonsThe VB Converter toolbar comes equipped with 5 buttons. Figure 3: VB Converter Toolbar Make Button VB Converter OptionsThe VB Converter Options dialog contains the following tabs: |
|
|
|
Environment TabThe Environment Tab has input controls to specify where tools are found and what options they need. |
|
|
|
|
|
|
|
Figure 4: Environment Tab
Java IDE. If you will be doing further development in an IDE such as Visual Cafe or JBuilder you will want to set it to appropriate IDE. Some of the IDE's such as Visual Cafe need to special tags generated in order to get maximum use of that environment. Note: The visual screen builders have been enabled for only JBuilder, JDeveloper, and Visual Cafe. All other IDE will only be able to use their text editors to edit the Form code. Output Directory. Specifies a location for the Applet/Application files generated from a Visual Basic Project. Select the "Use Output Directory" if you want the file to be generated into this directory. Otherwise, they will be generated in the same directory as the VB source files. Java Runtime Exe. To specify the Java runtime executable click on the browse (...) button. This executable is used to run the generated java application. This is typically named java.exe and is usually located in the bin directory underneath the directory that the Java SDK was intalled in. Java Compiler. The Java Compiler is set by default to the Java Compiler included with the Java Development Kit. To specify a different compiler such as Microsoft Visual J++, click the browse button and select the required compiler. User Name / Serial Number. Type in demo/demo or the user name and serial number exactly as it was given to you when you purchased the product. |
|
|
|
Database TabRefer to the Java Database Connectivity Guide for detailed information about
the Database Tab. General TabIn the General Tab you specify options related to code generation. Figure 6: General Tab
Spaces per Indent. The number of spaces that each block should be indented can also be specified. Compile Java Code. Causes the tool to invoke the Java compiler listed in the Environment tab after the Java code is generated. Use Portable Fonts. If selected then all font names will be converted into one of the standard Java fonts: Serif, SansSerif, or Monospaced. These 3 fonts will use the appropriate font on each platform that the application. Otherwise, the Windows font name will remain. Use jar library in HTML. If selected then the HTML file that is generated will reference the appropriate jar files. If not selected then the individual files will come from the diamondedge\* directories in the same place as the HTML file. You will need to copy them there if this is not selected. Ignore On Error Resume Next. If selected all "On Error Resume Next" statements will be commented out. If not selected then a try/catch block will be generated around each line of code which simulates the VB behavior. Java GUI Controls. This is used to specify which set of Java controls to use. All VB Converter extended controls inherit most of their behavior from the builtin Java controls such as the Java 2 Swing controls. For most applications it is recommended to use the Java 2 Swing (extended) controls option. By selecting this option you will have many more controls that can be converted to Java and you will have many more properties that are supported. The Swing (builtin) option uses the basic Java 2 swing controls directly instead of the extended controls. This option will cause more work to be done after conversion since there aren't as many properties and methods supported such as the ItemData property of a ListBox. When there are not equivalent controls available then the converter will use the swing extended controls. The 3rd swing option, Swing (Java 2 Only) is similar to the swing (builtin) option except that it will not use any extended controls. They become unsupported controls and their usages will be commented out. Each of these options require that you have a Java 2 compliant browser or Java runtime environment. If you want very small applets that have almost fewer classes to download you should choose the AWT controls. They do not use very many of VB Converter extension Java classes so the download can be faster. These applets will work with any Java 1.1 compliant browser. There are very few controls that are supported and very few properties are supported on the AWT controls. This is only appropriate for small simple applications which is typically what you would have on a public internet. More complex application that are used on a company intranet should use one of the swing options above. The Diamond Control Suite adds several additional controls that will be converted automatically. They will require the purchase of a license to that suite for each developer. See the supported features page for the list of controls supported by this suite. VB API. The VB Compatible option generates code that uses our library when the corresponding Java
API behaves differently than in VB or does not exist. The Use Java builtin option will generate code to
the closest Java API. This option will require more work after the conversion in order to deal with the differences
in behavior of the VB and Java versions of the API. About TabThe About Tab provides version information and contact information for customer support. |
|
|
|
|
|
|