Print Page | Close Window

Form_KeyDown events lost

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: ActiveX COM
Forum Description: Topics related to Codejock ActiveX COM products
URL: http://forum.codejock.com/forum_posts.asp?TID=12265
Printed Date: 23 November 2024 at 5:14pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Form_KeyDown events lost
Posted By: garyhenson
Subject: Form_KeyDown events lost
Date Posted: 26 September 2008 at 11:56am
I have an MDI app (VB6) using CommandBars, etc. (v10.4.1).
 
I show an MID Child with CBs and a treeview control. This form has a Form_KeyDown() event handler routine. KeyPreview is TRUE.
 
When I press the delete key part of the process is to show a dialog to verify that the User wants to do the delete. This dialog form is a very simple form with text and a few buttons. It uses commanbars as well but is NOT set as an MDI Child since you cannot show a modal form. (ie: you cannot 'Show frmX.Show vbmodal, owner' if it's an MDIChild.)
 
The dialog shows fine but now the calling MDIChild form's Form_KeyDown() events are not firing.
I've debugged in the code and Me.KeyPreview is still = TRUE.
 
I can focus (mouse click) on another MDI Child form in the app  and then focus back on this MDIChild form and the Form key events are working again!
 
However the treeview controls key_down events ARE firing! It's as if KeyPreview was being overrided and the commandbar control is passing the key to the form's control but not the form.
 
I have tried resetting form focus (me.SetFocus), no luck.
 
Is this a known issue with 10.4.1??
Is there a solution?
 
Thanks for any and all help.


-------------
Software Developer
Product: Xtreme SuitePro (ActiveX) version 13.0
Platform: Windows XP (32bit) - SP 3
Language: Visual Basic 6.0



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net