Bug in windowless ActiveX control activation

Source: Internet
Author: User

Description:
Create a VB Executable File Project, drag and drop a label to form, and set the keypreview attribute of form to true.
And handle the form keydown event:
Private sub form_keydown (keycode as integer, shift as integer)

Label1.caption = label1.caption & CHR (keycode)

End sub
The caption of label1 will show the characters you typed.
Create an MFC ActiveX Control and select "no window activation" in "control settings ",
After compilation, add the control to the VB project and drag it to the form,
Run the VB project again, press the keyboard, and the characters will appear again.

Return to the ActiveX Control Project and comment out the line of the getcontrolflags function:
Dwflags | = windowlessactivate; (key to windowless activation)

Compile and run the program. The VB project returns to normal again.

Depressing bug. Do you know whether experts can confirm and provide solutions?

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.