taskdialog (comctl32)
Last changed: -72.24.140.51

.
Summary
TaskDialog - Show a Windows Vista Task Dialog - like messagebox but much much better.

C# Signature:

[DllImport("comctl32.dll", CharSet = CharSet.Unicode,  EntryPoint="TaskDialog")]
static extern int TaskDialog(IntPtr hWndParent, IntPtr hInstance, String pszWindowTitle, String pszMainInstruction, String pszContent, int dwCommonButtons, IntPtr pszIcon, out int pnButton);

VB Signature:

Public Declare Auto Function TaskDialog Lib "comctl32.dll" (ByVal hWnd As IntPtr, ByVal hInstance As IntPtr, ByVal WindowTitle As String, ByVal MainInstruction As String, ByVal Content As String, ByVal CommonButton As Integer, ByVal DialogIcon As Integer, ByRef PushedButton As Integer) As Integer

User-Defined Types:

None.

Alternative Managed API:

A full wrapper for Vista's TaskDialog can be found here:

http://code.msdn.microsoft.com/TaskDialogforWinForm

Notes:

None.

Tips & Tricks:

It only works with forms applications, wpf applications give a entry point not found exception.

To make it work with wpf applications you need to add the following to your app.manifest under asmv1:assembly

  <dependency>
    <dependentAssembly>
      <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0"
            processorArchitecture="X86" publicKeyToken="6595b64144ccf1df" language="*" />
    </dependentAssembly>
  </dependency>

Sample Code:

Please add some!

Documentation
TaskDialog on MSDN