Old DOS dog needs help

Forgive my ignorance in asking this question correctly.

I am creating a Class Library to extend the functionality of an existing program. The existing program and my library communicate via a COM interface. Within my library I create a Modeless Form for user input. The Form must be modeless as there is user functionality within the main program the user must have access to.

The problem: If the user has selected a textbox on my form for input of data and begins to type in data, some of the keystrokes are captured by the main program and activate functionality within the main program. (My program does not receive the keystrokes) Same is true whe attempting to TAB between the various controls on my form, the TAB only works with the comboboxs on my form, otherwise the TAB does not cause the different controls to become active.

Someone who is familar with VB6 suggested the following:
AFX_MANAGE_STATE(AfxGetStaticModuleState())

I've read the description of the macro and it appears it would solve my problem, but of course I'm in VB .Net.

Any ideas????

Thanks - and make it a great day!

Ron

Comments

  • : Forgive my ignorance in asking this question correctly.
    :
    : I am creating a Class Library to extend the functionality of an existing program. The existing program and my library communicate via a COM interface. Within my library I create a Modeless Form for user input. The Form must be modeless as there is user functionality within the main program the user must have access to.
    :
    : The problem: If the user has selected a textbox on my form for input of data and begins to type in data, some of the keystrokes are captured by the main program and activate functionality within the main program. (My program does not receive the keystrokes) Same is true whe attempting to TAB between the various controls on my form, the TAB only works with the comboboxs on my form, otherwise the TAB does not cause the different controls to become active.
    :
    : Someone who is familar with VB6 suggested the following:
    : AFX_MANAGE_STATE(AfxGetStaticModuleState())
    :
    : I've read the description of the macro and it appears it would solve my problem, but of course I'm in VB .Net.
    :
    : Any ideas????
    :
    : Thanks - and make it a great day!
    :
    : Ron
    :
    :


    In the event handler that is catching keystrokes, maybe you can check who has the focus and ignore the event where appropriate.

    -Ray
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion