Many books regarding VB6 claims that VB has developed to 6.0. This version has nothing. The purpose of this article is not to evaluate whether this statement is proper, but it is to reveal how VB is "nothing".
Regardless of how VB can be applied to hardware control, memory management, process control, and large enterprise systems programming is an indisputable fact, although VB is not the most ideal development tool in some applications. So how do VBs implement these?
First, VB has a convenient ActiveX extension interface. This makes VB have an unlimited extension of the control and invisable components.
Open the VB6 integrated development environment, create new standard EXE projects, you will find that there are not many controls in the toolbox, and it is not enough to develop a complete program. At this time, you open the [Project] - [Parts] menu, you will find that the control you may use is basically inside, including the ADODC for connecting the database, used to bind and display data DataGrid or Show the common dialog of a variety of common dialogs, you can even click the [Browse] button to add a third party or write the OCX control written by other language tools. This is the convenient OCX extension interface of VB. With this interface, you don't have to worry about the VB limited built-in control.
Next you will find a lot of applications, especially some applications for files or applications with higher custom requirements, is difficult to use. At this time, you open [Engine] - [Reference] menu, you will find that many objects you may use, Microsoft has helped you write, including FileSystemObject for file operations or ADODB used for database operations, of course, many The three-party dynamic link library will also appear inside. After you add a corresponding reference, you can view the appropriate objects and methods in the object browser. Of course, you can also click the [Browse] button to add a third party or yourself. The DLL dynamic link library written by other language tools is the convenient DLL extension interface of VB.
Second, VB can establish an ActiveX control engineering and ActiveX DLL project from version 6.0. This means you can put some commonly used controls or classes into COM objects to achieve the second-grade code multiplex, which is very meaningful to build a large enterprise system, you can even wait at VC , Delphi and so on. The development tool calls you written with VB. Of course, the ActiveX control with VB is not a good idea, and VC is sometimes a better choice.
Finally, by declaring and calling the Windows API function (Windows Application Interface Function), VB can extend the contact angle to the inside of the operating system to implement some of the underlying functions. VB declares an API function in accordance with the following format:
Private Declare Function SendMessage LIB "User32" Alias "SendMessagea" (Byval Hwnd As Long, Byval WParam As Long, LParam As Any) As long
The API function can be called as the internal function, but you need to pay attention to the return value and parameter type when calling.