microsoft.public.dotnet.general, microsoft.public.dotnet.languages.csharp,microsoft.public.developer

A

Anushya

Hi
How to get the handle of outlook in an addins for outlook..

I tried this and couldnot find the namespace of IOleWindow. Is it in
UnsafeMethods of System.windows.forms.

IntPtr GetWindowHandle(IOleWindow Item)
{
IntPtr hWnd;
IntPtr hResult;
hResult = Item.GetWindow(hWnd);
return hWnd;
}
GetWindowHandle(Connect.GlobalApplicationObject.ActiveExplorer());

How to proceed to get the outlook window handle??
Anushya
 
N

Nicholas Paldino [.NET/C# MVP]

Anushya,

IOleWindow is not defined anywhere in the framework (at least where it
is publically available). If you want to use it, then you will have to
define it yourself. If you define it correctly, then your definition will
be accepted by the runtime when your method it called with a parameter of
that type.

Hope this helps.
 

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