Tab Stop not working 
Author Message
 Tab Stop not working

Hoi,

I working on a program which can download and install components. After a
component is installed a dispatch is created to get the name and icons etc.
After a component is selected to activate, the components "DoForm" function
is called which in VB does a load form and returns the window handle. The
container program, written in VC, uses this handle to place the componenet
within its client space.

All works well except for the TabStop's !!!!

When writing a client component in VC I can send a WM_NEXTDLGCTL on
receiving a VK_TAB. But when the component is written in VB it does not seem
te work.

 So my questions are, how does the TabStop work in VB and how can I make it
work?

Thanks,
Dennis



Sun, 13 Nov 2005 17:10:12 GMT  
 Tab Stop not working
I never tried similer thing but one thing that crossed my mind :

Have you set the 'TabIndex' properties (properly, i.e. the sequence you want
the Tab Stop to work) for the controls on VB Form?

HTH
--
Ashok Gupta - ashi
This posting is provided "AS IS" with no warranties, and confers no rights.

Quote:
> Hoi,

> I working on a program which can download and install components. After a
> component is installed a dispatch is created to get the name and icons
etc.
> After a component is selected to activate, the components "DoForm"
function
> is called which in VB does a load form and returns the window handle. The
> container program, written in VC, uses this handle to place the componenet
> within its client space.

> All works well except for the TabStop's !!!!

> When writing a client component in VC I can send a WM_NEXTDLGCTL on
> receiving a VK_TAB. But when the component is written in VB it does not
seem
> te work.

>  So my questions are, how does the TabStop work in VB and how can I make
it
> work?

> Thanks,
> Dennis



Sun, 13 Nov 2005 18:07:16 GMT  
 Tab Stop not working
Thaks for your quick responce but:

Yes the 'TabIndex' proprty is set and when I do the same, but using a VB
program to host the component it works fine.



Quote:
> I never tried similer thing but one thing that crossed my mind :

> Have you set the 'TabIndex' properties (properly, i.e. the sequence you
want
> the Tab Stop to work) for the controls on VB Form?

> HTH
> --
> Ashok Gupta - ashi
> This posting is provided "AS IS" with no warranties, and confers no
rights.


> > Hoi,

> > I working on a program which can download and install components. After
a
> > component is installed a dispatch is created to get the name and icons
> etc.
> > After a component is selected to activate, the components "DoForm"
> function
> > is called which in VB does a load form and returns the window handle.
The
> > container program, written in VC, uses this handle to place the
componenet
> > within its client space.

> > All works well except for the TabStop's !!!!

> > When writing a client component in VC I can send a WM_NEXTDLGCTL on
> > receiving a VK_TAB. But when the component is written in VB it does not
> seem
> > te work.

> >  So my questions are, how does the TabStop work in VB and how can I make
> it
> > work?

> > Thanks,
> > Dennis



Sun, 13 Nov 2005 19:16:49 GMT  
 Tab Stop not working
this is going to be difficult to make work smoothly. simply put, VB forms
are not meant to be "sited" in this way. otherwise, we could just forget
about writing custom activex controls are do all the UI with forms sited on
forms and so on.

one thing that i have found out is that if you site a form like this and you
need to make the taborder working you have to call SetFocus on a usercontrol
placed on it. that is in your DoForm method try to call SetFocus on an
instance of a custom VB usercontrol (the "siter" control).

unfortunately the behavior you will get is not consistent. if you site two
forms on your container you can't automagically persuade them to forward
focus to each other i.e. once a form gets the focus the tab key will cycle
the controls on it *only*.

HTH,
</wqw>


Quote:
> Hoi,

> I working on a program which can download and install components. After a
> component is installed a dispatch is created to get the name and icons
etc.
> After a component is selected to activate, the components "DoForm"
function
> is called which in VB does a load form and returns the window handle. The
> container program, written in VC, uses this handle to place the componenet
> within its client space.

> All works well except for the TabStop's !!!!

> When writing a client component in VC I can send a WM_NEXTDLGCTL on
> receiving a VK_TAB. But when the component is written in VB it does not
seem
> te work.

>  So my questions are, how does the TabStop work in VB and how can I make
it
> work?

> Thanks,
> Dennis



Sun, 13 Nov 2005 19:29:41 GMT  
 Tab Stop not working

Hoi if I understand you, you calling into a COM object, getting the window
handle and then displaying this directly, dont like this at all, how to
connect accelerator keys and focus issues and and is going to drive you
nuts.

But you using C, clearly a hot programmer, so go have a look at ATL and a
class called CAxWindow, it can host controls, and you'll be able to do this
stuff.

Good luck


Quote:
> Hoi,

> I working on a program which can download and install components. After a
> component is installed a dispatch is created to get the name and icons
etc.
> After a component is selected to activate, the components "DoForm"
function
> is called which in VB does a load form and returns the window handle. The
> container program, written in VC, uses this handle to place the componenet
> within its client space.

> All works well except for the TabStop's !!!!

> When writing a client component in VC I can send a WM_NEXTDLGCTL on
> receiving a VK_TAB. But when the component is written in VB it does not
seem
> te work.

>  So my questions are, how does the TabStop work in VB and how can I make
it
> work?

> Thanks,
> Dennis



Wed, 16 Nov 2005 08:28:26 GMT  
 Tab Stop not working
Hi,

Quote:
> When writing a client component in VC I can send a WM_NEXTDLGCTL on
> receiving a VK_TAB. But when the component is written in VB it does not
seem
> te work.

>  So my questions are, how does the TabStop work in VB and how can I make
it
> work?

I didn't work with VB form before, and might be wrong. In my understanding
VB form exposed to your VC container as ActiveX control (or maybe Active
Document ?).

For in-place activated ActiveX controls container uses
IOleInPlaceActiveObject::TranslateAccelerator to process accelerator-key
window messages. Inside TranslateAccelerator control handles related
messages,  for example processes TAB key, etc.
Also IOleControl::GetControlInfo/OnMnemonic can be used by container to
proceed control accelerators.

Active Documents container calls IOleInPlaceFrame::TranslateAccelerator for
in-place activated documents.

So to make TAB key working you need to update container's message loop, and
call control's IOleInPlaceXXX::TranslateAccelerator method there, when it's
necessary (usual place is where container makes own Win32 API
::TranslateAccelerator call).

Hope it helps.

--
Best regards,
Vadim Melnik
_____________________
http://www.docsultant.com/



Wed, 16 Nov 2005 17:41:19 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Tab stop ranges not unique in tab panels!

2. WHY DID THE TAB KEY STOP WORKING?

3. Tab key in VB5 IDE stopped working?

4. tab to/from text box not working

5. Tab Key Not Working - Wierd!

6. IDE Tabs not working correctly

7. Tab Order VB.NET Not working right

8. Tab Order VB.NET Not working right

9. TAB not working with SendKeys

10. tab-key navigation not working

11. SOLUTION - Arrow / Navigation keys / TAB not Working in Visual Basic

12. Tab Index does not work with SStab

 

 
Powered by phpBB® Forum Software