Introduction to Visual Basic com

Source: Internet
Author: User
"There is no difficulty in the world, as long as you are willing to climb", so you must be confident to become a com programmer, and you must be able.

In fact, every time we set the text attribute of the text Programming Control, we are already using COM. When the DaO data control runs the movenext method, even when we use VB to control the word, com is also used.

So what is com?

First, COM is a communication method.

For example, just like our TV remote control. When we press a channel button, the TV channel immediately switches, and when we press the button, the TV is immediately closed. In fact, we don't care about how they work. We only know that you can press a button to create an action.

The same is true for programs. When we change the text attribute of the text Programming Control, we do not know the principle. Maybe the system can call dozens of API functions? However, users only need to care about the text displayed in the text Programming Control.

Second, COM is a way to reuse code.

The biggest advantage of using COM is that once the COM Communication method is established, it can be conveniently used multiple times anywhere. For example, when you create a COM component for displaying the date and time, it can be used anywhere in any program. Not only can VB Applications and Excel programs be accessed, but also can c ++ applications.

Therefore, the code reusability of COM components is the most important.

Again, COM is based on actual objects.

Most components created with COM are based on actual objects, which means that once a component is created, it is quite easy to use. Imagine another way to add a user in a computer system, such as customer. is add as simple as adding data processing code packages and algorithms, or adding large database DLL to applications? Obviously, com supports this simple operation.

Therefore, COM is a communication method, code reuse method, and based on actual objects.

Later in this tutorial, we will briefly discuss the relevant content of COM and VB, including the creation of classes and how to convert classes into an actual object. Although the content here is too simple, it is the foundation of future COM programming.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.