I agree that the problem is with the processing of the keyboard events.
But the question is how to fix it. Currently, I do not see a reliable way to
1) C# should take care about assigning a unique window indentifier.
from a Win32 application. (In this case it's mmc.exe).
"Lloyd Dupont" wrote:
> looks obvious to me!
> that's the WndProc/Event loop the problem!
>
> I have write 2 such function in my whole life and it was a while ago so I
> cannot give you a more detailed answer..... but maybe there is a WNDCLASS (a
> system unique string describing the windows) issue there?
>
> well, I can't do more, but hope it will gives you some idea...
>
> "Dima67@yahoo.com" <Dima67@yahoo.com@discussions.microsoft.com> wrote in
> message news:AF6FF841-8C81-4CD7-A4F1-95FDB8EC4796@microsoft.com...
> > Hi group!
> > please, help me with the following problem:
> >
> > When I open a non-modal form from a VB6 written MMC snap-in the form works
> > fine. But I can't use ob TAB key to navigate through its fields. The form
> > just ignores it.
> >
> > I found some discussion about such case and they proposed a solution for a
> > form that doesn't use a Tab Control. But in my case the form has a Tab
> > Control and the proposed solution does't work.
> >
> > There is no problem with the form when it works in modal mode (i.e. if
> > its'
> > opened with ShowDialog() call).
> >
> > I tried the following workarounds:
> >
> > 1) Started the non-modal form in a new thread.
> >
> > Problem found: I can use TAB to switch between all form controls untill a
> > checkbox get the focuse. When the focuse comes to the checkbox TAB and
> > Shift-TAB keys are ignored again. When I select other control with the
> > mouse
> > TAB key sarts to work again until the checkbox gets the focus again.
> >
> > 2) I added a hook using SetWindowsHookEx call to intercept all messages
> > from
> > the main message loop and process them accordingly (See
> >
http://www.tech-archive.net/Archive/DotNet/microsoft.public.dotnet.framework.windowsforms/2004-05/0112.html)
> >
> > Problem found:
> > a) TAB order in the form become random.
> > b) TAB key selects only Tab Pages and standalone controls but doesn't
> > allow to select a coltrol in these Tap Pages.
> >
> > Please help!
> >
> > Dima
>
>