I got some probelms with Outlook Address Book
When I open a new one I develeped with C#, It open after the older one - Office Product is prividing Itself - appeared
The older one appear and close automatically
It is a little bit annoying me
so, I hope I open my one without the older one's appearing or with hiding it
Is there a way ?
WinApiProvider Class
public const uint WM_SYSCOMMAND = 0x0112;
public const int SC_CLOSE = 0xF060;
[DllImport("user32", CharSet = CharSet.Auto)]
public static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
[DllImport("user32.dll")]
public static extern int SendMessage(IntPtr hWnd, uint Msg, int wParam, int lParam);
/* SendMessage */
1. ((Outlook.InspectorEvents_10_Event)Inspector).Deactivate Event Function
IntPtr hBuiltInDialog = WinApiProvider.FindWindow("#32770", "");
WinApiProvider.SendMessage(hBuiltInDialog, WinApiProvider.WM_SYSCOMMAND, WinApiProvider.SC_CLOSE, 0);
_showOwnDialogOnActivate = true;
2. ((Outlook.InspectorEvents_10_Event)Inspector).Activate Event Function
if (_showOwnDialogOnActivate)
{
RecipientDialog customDialog = new RecipientDialog(Inspector.CurrentItem);
customDialog.ShowDialog();
}