开发者

Bring Outlookelements to front

开发者 https://www.devze.com 2022-12-18 10:04 出处:网络
I\'m opening Outlookelements with the shown Code (scroll down; C# Code). Sometimes the elements don\'t come to front so you first have to select them. Any idea how to do this? I thou开发者_Go百科ght a

I'm opening Outlookelements with the shown Code (scroll down; C# Code). Sometimes the elements don't come to front so you first have to select them. Any idea how to do this? I thou开发者_Go百科ght about the handle and doing this by hand.

Other idea's?

Thanks Thomas

MAPIFolder objFolder = new ApplicationClass().GetNamespace("MAPI").GetDefaultFolder(OlDefaultFolders.olFolderNotes);
                foreach (NoteItem note in objFolder.Items)
                    note.Display(false);


If you are calling from another app you will have to handle the Hwnd, you can do this via Win API calls or you can use Redemption's SafeInspector which which has an Handle property.

Here is a link how to get the hWnd via WinApi http://theflaker.com.ar/blog/?p=10

0

精彩评论

暂无评论...
验证码 换一张
取 消