Desktop Functions: Smart Device Functions:
|
PickIconDlg (shell32)
C# Signature:
[DllImport("shell32.dll", CharSet=CharSet.Unicode)] VB Signature:
Declare Unicode Function PickIconDlg Lib "Shell32" Alias "PickIconDlg" (ByVal hwndOwner As IntPtr, ByVal lpstrFile As String, ByVal nMaxFile As Integer, ByRef lpdwIconIndex As Integer) As Integer Notes:This function behaves differently on 9x/ME than on Windows NT->XP Sample Code:C# Version:
string iconfile; Tips & Tricks:Please add some! Shouldn't it look like this:
retval = PickIconDlg(this.Handle, sb, sb.Capacity, ref iconindex); Sample Code:C# Version:
string iconfile; VB.NET Version: Dim iconfile As String = Environment.GetFolderPath(Environment.SpecialFolder.System) + "\shell32.dll" Dim iconindex As Integer ' Will store the index of the selected icon Dim retval As Integer ' Will contain the result of the PickIconDlg. 1 = OK, 0 = Canceled Shouldn't it look like this:
retval = PickIconDlg(this.Handle, sb, sb.Capacity, ref iconindex); retval = PickIconDlg(Me.Handle, iconfile, iconfile.Length, iconindex) VB.NET Version: Dim iconfile As String = Environment.GetFolderPath(Environment.SpecialFolder.System) + "\shell32.dll" Dim iconindex As Integer ' Will store the index of the selected icon Dim retval As Integer ' Will contain the result of the PickIconDlg. 1 = OK, 0 = Canceled retval = PickIconDlg(Me.Handle, iconfile, iconfile.Length, iconindex) MessageBox.Show("Result: " + retval.ToString() + vbCrLf + "Selected Icon Index: " + iconindex.ToString()) Please edit this page!Do you have...
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more). |
|