Problem with using .net forms from vb6

I have an wierd problem with the tab key in .net forms:

If i create a standard form and then instantiate it in the usual way from a .net application then everything works perfectly.  However, if i create a com interop wrapper that instantiates the form on behalf of a vb6 client, then the tab key refuses to work.

I have also discovered that this behaviour only occurs if the form is displayed non-modally (f.show()).  If it's shown as a dialog (f.ShowDialog()), then the tab key works...

Like a lot of people, I am looking at migrating functionality from activex dlls to .net, while leaving the application shell as a vb6 application for the time being, and this is going to be a major problem.

Has anybody else seen this   Does anybody have an answer   Currently, all I can do is trap the tab key press and move focus to the next control in code.

Note:  I have tried this with both 2003 and 2005 beta 2, using a form with just some text boxes on it.

Thanks in advance for any advice.



Answer this question

Problem with using .net forms from vb6

  • RonaldLaeremans

    Hi,

    The last time I saw this behavior was when I was developing an app that runs within AutoCAD. I think this behavior occurs when a managed form displays on a COM client such as VB6. My workaround on this was that I showed the form Modally and the tabs suddenly worked fine...

     

     

    cheers,

    Paul June A. Domag



  • m2s2

    While I'm calling the .net forms from Access 2003 instead of vb6, the problem still exists with VB 2005 release. I must use the showdialog method if the tab keys are to work. Has anybody heard of a solution
  • Anonymous888888888kjhkiy098er6e5

    Hi,

    Well, the best that you could do is report that to Microsoft Feedback.

     

     

     

     

    cheers,

    Paul June A. Domag



  • hawaiian dude

    Yeah i found that as well.  However, its not always possible to do that.  This could be a big issue for a lot of people if you want to migrate to .net this way.  My workaround is to trap the key press event and move focus to the next control manually.  Hopefully Microsoft can sort this out for the 2005 release...

    Thanks,

    Nick.

  • Problem with using .net forms from vb6