Visual Basic 6 Deluxe Learning Edition can compile to make .exe files. I was recently looking to buy Visual Basic 6 to compile my old programs that I made many years ago, so I could upload them on the Internet for others to use. I figured this old software would be very cheap on eBay; however, I was surprised to find how popular it still is with prices above £50.
There was not much information about different versions and their capabilities, and some of it was misleading. The Learning Edition was selling for much less, because people wrongly assumed it could not make .exe files.
Can it compile to make .exe files?
Here is a screenshot of the “File” menu. As you can see, it offers the option to compile Project1 to make an executable file.
Not only does it compile to make an .exe file there is also a deployment wizard to help create a setup file so you can distribute your application to other machines. The setup file will package the necessary runtime .dll files and .ocx files together with your .exe file.
Can I call functions within external .dll libraries?
For example, if you want to call graphics functions in the gdi32.dll you can do that without any limitations. In fact, there are no limitations in using dll and ocx files.
||n and p||n and p|
|Call dll Functions||yes||yes
What is p-code and n-code?
There are two types of file compilation known as p-code and n-code. Visual Basic 6 Deluxe Learning Edition compiles .exe files to p-code. Does the compilation type matter? The quick answer is no, p-code is the most compatible to run on different operating systems and the most stable.
P-code, often referred to as 'packed' or 'pseudo' code is Microsoft's earlier technology of using a virtual machine to run the code on. As a result, the .exe file requires the Msvbvm60.dll, which is the Microsoft Visual Basic Virtual Machine 6 library file.
The good thing about this technology is that your p-code runs entirely on the virtual machine, which eliminates operating system compatibility issues when executing the code on other systems.
N-code, also known as “native code”, is Microsoft's newer technology. Executables compiled in the native format run directly on the operating system, without the Virtual Machine library file. A problem most encountered with the n-code executables is that it sometimes works fine on one operating system, but fails to operate on another. Even worse, sometimes you can come across strange run time errors, and simply changing the order of the statements and recompiling will eliminate the errors. This can be very time consuming when debugging.
In contrast, p-code executables always run on the virtual machine library file so running it on different operating systems eliminates compatibility issues.
What is faster, p-code or n-code? It is difficult to say which is faster; logic would dictate that n-code should be faster because it makes direct calls to the operating system compared to p-code, which runs on the virtual machine, which then translates for the operating system, however, it is not that simple. The Msvbvm60.dll virtual machine is itself compiled to n-code, as well as all the .dll files within an operating system. If you made a large program that made calls to external functions in other .dll files, then some parts of your program will be running in n-code and others in p-code. As a result, the overall performance is difficult to gauge, when making comparisons.
Generally, a good algorithm in p-code will be faster than a bad one in n-code. Therefore, writing efficient p-code will be just as fast.
If you are an engineering student, and you are planning to write applications involving the serial communications port, then this version of VB6 does not contain the mscomm32.ocx needed for serial port communications.
Conclusion: If you are considering buying the Visual Basic 6 Deluxe Learning Edition, be assured that it can compile and make .exe files.