Board index » cppbuilder » VCL forms, a non-VCL app, and the tab key

VCL forms, a non-VCL app, and the tab key

I'm in the process of converting a DLL from VC to BCB.  (A Winamp
plug-in to be exact.)  Everything's worked fine so far, except I've
noticed the tab key doesn't move from one field to the next in my forms.

According to the help, a form must have a parent in order for the tab
key to work.  The question is, how do I assign a non-VCL parent to my
VCL form?  Simply setting the parent handle of the form doesn't do the
trick.

Any help would be appreciated.

 

Re:VCL forms, a non-VCL app, and the tab key


Hi, Kenneth!

Try using the alternate TForm constructor that accepts a window handle
as owner.

------
Mark Cashman (TeamB - C++ Builder), creator of The Temp{*word*203}Doorway at
http://www.temporaldoorway.com
- Original digital art, writing, music and more -
C++ Builder / JBuilder Tips and The C++ Builder Programmer's Webring
(Join us!)
http://www.temporaldoorway.com/programming/index.htm
------

Re:VCL forms, a non-VCL app, and the tab key


Quote
> Try using the alternate TForm constructor that accepts a window handle
> as owner.

Unfortunately, that didn't work.  I've tried assigning every handle I
can find to the ParentHandle of the form.  I even tried to force the tab
key by capturing the WM_KEYDOWN message, but apparently the VCL filters
out the keypress before passing the message along.

The only partial solution I've found is to use the OnKeyDown event of
the form and call FindNextControl on a tab press.  This is a partial
solution because the VCL still handles the keypress (even if I set the
Key variable to 0) which causes Windows to sound a 'ding' as if I've
performed an invalid operation. :(

Other Threads