Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.tables
Enn Enn is offline
external usenet poster
 
Posts: 1
Default Collapsing Word Menu

I have got an issue with programatically closing / collapsing the word menu.
Here is what I am doing...

I have a Windows forms based application developed in C#. I have an user
control within the form. I create the Word application object and a word
document. I open a .doc file and get the window handle to the word Document
using PInvoke (FindWindow). I set the user control as the parent window to
the handle I got above. So I am able to see the Word document in the use
control.

Now when I click on any of the menu items (say for example, on File or Edit
or View...), keep the menu open / expanded and click on any other application
running from the task bar and click on my application again - my application
is not getting the focus.

I suspected that the menu opens a new window which has obtained the focus
and when I switch back the menu window has the focus and not my application.

I have tried the following:

1. Tried to subclass (using NativeWindow) the menu (MsoCommandBar and
"MenuBar") using FindWindow. This way I tried to close the menu window by
posting a message. I did not get any messages on menu click. After Googling I
found that it is not possible to subclass an unmanaged window in managed
window.

Can you please help me with the solution?

TIA

Enn
Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Word 97 in Windows XP to maintain formatting Charlie''s Word VBA questions Microsoft Word Help 22 May 20th 23 08:51 PM
Reveal codes in a word document FUN101 Microsoft Word Help 4 May 16th 23 08:47 PM
Word & WordPerfect MrsMac Microsoft Word Help 5 June 10th 06 03:14 AM
hard space between words. Sandy L Microsoft Word Help 7 May 5th 06 08:25 PM
How can Word display full path of a file in the title bar? SAsif Microsoft Word Help 1 January 26th 06 05:32 PM


All times are GMT +1. The time now is 12:16 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"