Showing the Internet Properties dialog from Managed Code

An interesting tip from Rob Gruen on showing 2 ways of launching the internet properties dialog from managed code:

http://weblogs.asp.net/robgruen/archive/2005/02/02/366038.aspx

I like the PInvoke way myself

[DllImport(“inetcpl.cpl”, SetLastError = true)]<?xml:namespace prefix = o />/o:p
public static extern int LaunchInternetControlPanel(IntPtr hWnd);            /o:p

 /o:p

// Launch the IE internet properties as a modal dialog for this winform/o:p
LaunchInternetControlPanel(this.Handle);

I’ve heard that in framework 2.0 the networking stack will even support IE’s “Automatically Detect Settings” mode, which should make network configuration and troubleshooting end user connectivity issues much easier.