Article Preview
Buy Now
FEATURE
VB6 DLL Class to Xojo
Getting Visual Basic 6 DLLs to Work in Xojo
Issue: 15.1 (January/February 2017) Related Link(s): None Excerpt of article text... e>There are quite a few old Visual Basic 6 (VB6) programs that are still being used on Windows OS. The reason for this is that Visual Basic 6 was an extremely popular programming language and there are many old algorithms that were developed. Although the best way to create a program is to manually rewrite the dynamic link libraries (DLL) over to Xojo, and the second-best option is to directly convert VB6's dll to Xojo with the handy Active X dll control in Xojo. I happen to have a copy of Windows XP running and my old version of Visual Basic 6. This article will show how we create a couple of methods and show the whole Active X dll conversion process and run the DLL in Xojo. The first steps are to start VB6 and select an ActiveX DLL project (see Figure 1). Once the DLL project has opened, let's save the project as VB6DLLProject, and save the default class as In Class1(VB6DLLProjectClass1.cls) add the following code to add two double numbers together and return the sum of these values. ...End of Excerpt. Please purchase the magazine to read the full article.
Author: Eugene Dakin
Author Bio: Eugene Dakin is an author, professional chemist, oilfield consultant and programmer in Canada. When he is in-between courses and oilfield projects, he and his wife spend valuable time raising their wonderful children. He has been hobby programming on computer's for over 25 years. He has created over 185 technical and industrial simulation program
Article Description: r>
Article Length (in bytes): 7,619
Starting Page Number: e>
Article Number: 15103
Resource File(s): project15103.zip Updated: 2017-01-02 14:51:02
VB6DLLProjectClass
. Visual Basic's class acts similarly to a Xojo class. Now let's write some code (see Figure 2).Public Function AddTwoNumbers(x As Double, y As Double) As Double