PickIconDlg (shell32)
Last changed: -171.251.236.129

.
Summary
Shows the common Pick-Icon-Dialog

C# Signature:

DllImport("shell32.dll", CharSet=CharSet.Unicode)]
private static extern int PickIconDlg(IntPtr hwndOwner, System.Text.StringBuilder lpstrFile, int nMaxFile, ref int lpdwIconIndex);

VB Signature

TODO?

Notes:

This function behaves differently on 9x/ME than on Windows NT->XP

Tips & Tricks:

Please add some!

Sample Code:

string iconfile;
int iconindex = 0;
int retval;
System.Text.StringBuilder sb;

iconfile = Environment.GetFolderPath(Environment.SpecialFolder.System);
iconfile = iconfile + @"\shell32.dll";
sb = new System.Text.StringBuilder(iconfile, 500);
retval = PickIconDlg(this.Handle, sb, sb.Length, ref iconindex);
iconfile = sb.ToString();

Shouldn't it look like this:

retval = PickIconDlg(this.Handle, sb, sb.Capacity, ref iconindex);