How do I get a task pane location?

J

Ji Zhou

Hello Dave,

The CustomTaskPane object does not expose its location property. We have two
ways to work around,

1. Get the information via
Application.CommandBars[ctpname].Left
Application.CommandBars[ctpname].Top

2. Get the information via Windows API
FindWindowW
GetWindowRect

See a FAQ item in VSTO FAQs,
http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/946b1d90-c201-43d6-8972-d31261d23fba

It is same in the COM addin.


Best regards,
Ji Zhou - MSFT
Microsoft Online Community Support
 

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