KevinLi

I want to capturing the resize event of Outlook itself, but I don't know how to do. What I can do now is to capture the resize event of Explorer and Inspector.

Does somebody know how to capture Outlook Resize event

Many thanks.



Re: Visual Studio Tools for Office How to get notification when Outlook resized for Outlook Addin

Sue Mosher - Outlook MVP

The Explorer and Inspector windows *are* "Outlook itself." It's not clear what you want to do that their BeforeSize events wouldn't support.





Re: Visual Studio Tools for Office How to get notification when Outlook resized for Outlook Addin

KevinLi

Hi Sue Mosher ,

If I open a new Explorer, for example, open a new Explorer for Inbox, then when I resize the new windows, the BeforeSize is triggered. But when I resize the default Main Window of Outlook (I think it also should be an Explorer), the BeforeSize event does not be triggered.

Maybe I do not correctly bind the BeforeSize event for the default Main Window. I bind the BeforeSize event in the methods "InitalizeAddin()" & "explorers_NewExplorer()"

Code Block

foreach (Outlook.Explorer explorer in explorers)
{
AddExplorer(explorer);
explorer.BeforeSize +=new Microsoft.Office.Interop.Outlook.ExplorerEvents_10_BeforeSizeEventHandler(explorer_BeforeSize);
}

Also thanks for you reply on another my thread http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=2285526&SiteID=1. I'm trying to customize the ToDoBar with Windows API. So I'd like to get notification when the Main Windows is resized so that I can resize my customize control in the ToDoBar.

Many thanks.





Re: Visual Studio Tools for Office How to get notification when Outlook resized for Outlook Addin

Sue Mosher - Outlook MVP

The "main window" is also an Explorer. You will want to maintain a wrapper class of all open Explorer windows, checking on startup whether an Explorer is already open. Outlook MVP Ken Slovak has posted templates at http://www.slovaktech.com/outlook_2007_templates.htm to make that easier.