2nd Post, Tabbing Problem in Interop Component

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mike

    #1

    2nd Post, Tabbing Problem in Interop Component

    I am working on an application originaly developed in VB5.0/6.0 that has a
    mdi parent/child forms. I created a VB.net 2003 program with a couple of
    forms, compiled it as a dll and registered it as a com interop assembly. I
    call this application from a menu item on the mdi parent form in the vb5/6
    application. The result is that the user can use my dot net form by selecting
    the appropriate menu item from the original vb5/6 program. The problem is
    that once in a while, the tab key will quit working. The only way the user
    can change fields on the dot net form is to click on the with the mouse. If I
    quit and restart the main vb5/6 program and restart it then it will work for
    a little while. I found ms article #145566 that seems to be close to my
    problem but the fix is not workable in my situation. Any ideas appreciated.
    Thanks
  • Yuri

    #2
    RE: 2nd Post, Tabbing Problem in Interop Component

    To make it work you have to create another GUI thread in your .NET assembly
    and launch your form from that thread.

    1. Create another thread.
    2. In the thread function call Application.Run (new MyForm())
    where MyForm is your .NET visual basic form.

    Sorry, I don't know visual basic syntax. The above is the syntax for C#.

    "Mike" wrote:
    [color=blue]
    > I am working on an application originaly developed in VB5.0/6.0 that has a
    > mdi parent/child forms. I created a VB.net 2003 program with a couple of
    > forms, compiled it as a dll and registered it as a com interop assembly. I
    > call this application from a menu item on the mdi parent form in the vb5/6
    > application. The result is that the user can use my dot net form by selecting
    > the appropriate menu item from the original vb5/6 program. The problem is
    > that once in a while, the tab key will quit working. The only way the user
    > can change fields on the dot net form is to click on the with the mouse. If I
    > quit and restart the main vb5/6 program and restart it then it will work for
    > a little while. I found ms article #145566 that seems to be close to my
    > problem but the fix is not workable in my situation. Any ideas appreciated.
    > Thanks[/color]

    Comment

    Working...