Using Ccrphotkey control to set hot keys in VB

Source: Internet
Author: User

Introduction: Ccrphotkey is a third-party control that makes it easy to implement hotkey functionality

Using the sample

You must be familiar with "ctrl+alt+z", right? Yes, it is the QQ Open message dialog box, the default hotkey, through this set of hot keys, we can very quickly open the message dialog box to see, greatly accelerate the speed of our operation. At the same time we also know that in the QQ system settings can be set on the hotkey (Figure 1), when we press any hotkey combination, the text box will display the hotkey combination in real time, let the user understand what the hot key is currently pressed.

Figure 1

Hotkeys can greatly speed up the user's operation, for developers, the use of hot keys in their own programs will also make it easier to operate, making the program more humane. Then you also want to implement like QQ, you can let users set the Hot key edit box? Let's use the example to introduce a very useful control ccrphotkey that can help you achieve powerful hotkey features easily.

The appearance of the Ccrphotkey control and many of its properties are similar to the properties of the text box that we are familiar with, so we can easily set it.

Step one: Start Visual Basic 6.0 first and create a new window.

Step two: Load the Ccrphotkey control and set its properties.

① Right-click in the Control toolbar, select "Part", click "Browse" in the pop-up window, locate the Ccrphotkey control, load it, and add it to the Form1 form in the appropriate place.

② Modify Ccrphotkey control properties. When you select the Ccrphotkey control, you can set it in the property settings area, where key combination settings are most important (Figure 2), and you can set up or disallow certain combinations as needed, such as prohibiting "ctrl+alt" combinations, Change the Allowctrlalt property to False, and so on. Of course, we can also change these properties dynamically in the process of running a program.

Figure 2

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.