I am creating an Outlook Message. Sometimes the Outlook Compose window appears behind other windows.
How can I make it the top most?
String address = "someone@example.com";
Outlook.Application oApp = new Outlook.Application();
Outlook._MailItem oMailItem = (Outlook._MailItem)oApp.CreateItem(Outlook.OlItemType.olMailItem);
oMailItem.To = address;
oMailItem.Subject = "Help";
oMailItem.BodyFormat = Outlook.OlBodyFormat.olFormatPlain;
oMailItem.Attachments.Add("H:\\file.txt");
oMailItem.Body = "Call me";
// body, bcc etc...
oMailItem.Display(true);
I am using WinForm and .Net 2.0 (target)