ArcGIS Explorer Extension - Bring To Front

627
2
09-26-2011 02:15 PM
SeanConnolly
New Contributor
Hello,

I am creating an Extension and I would like to be able to bring the ArcGIS Explorer window to the front; ArcGIS Explorer may be minimized or there may be another window hiding it.
0 Kudos
2 Replies
SeanConnolly
New Contributor
I would also like to Minimize ArcGIS Explorer. I am creating this extension in .NET
0 Kudos
ErinBrimhall
Occasional Contributor II
I would also like to Minimize ArcGIS Explorer. I am creating this extension in .NET


You will need to use the Windows API to perform these types of operations on an application window like ArcGIS Explorer.


[DllImport("user32.dll")]
private static extern bool SetForegroundWindow(IntPtr hWnd);

private static void BringArcGisExplorerToFront()
{[INDENT]
    IntPtr handle = ESRI.ArcGISExplorer.Application.Application.Window.Handle;
    SetForegroundWindow(handle);[/INDENT]
}



And here is an MSDN post on a similar method for setting the state of a window (e.g. minimized, maximized): How do I maximize/minimize applications programmatically in C#?
0 Kudos