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:

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


// Launch the IE internet properties as a modal dialog for this winform/o:p

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.