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?