Collapse Word menu and lost focus.

E

enn

Hi,

I have a user control in Windows forms. I am setting this control as the
parent for the Word. I am able to see the documents fine. But when I click
the Word menu (example "File") keep it expanded and switch to other
applications on task bar and try to switch back to my application, my
application will not get the focus back. But when the menu (File) is clicked
and thereby collapsing the menu, this problem is not seen.

I am trying to handle this like:

- Trap the event for switching to other applications on task bar.
- Before losing focus, I would like to simulate the menu click to collapse
the menu

But I am not able to find which event gets triggered when the menu is
expanded / colalpsed. I tried to use NativeWindow on Word application but I
am not getting messages.

How do I proceed?

TIA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top