it works here...
code:
Public Declare Function DestroyIcon Lib "User32.dll" (ByRef phicon As
IntPtr) As Boolean
Public Declare Function ExtractIconEx Lib "shell32.dll" _
(ByVal lpszFile As String, ByVal nIconIndex As Integer, _
ByRef phiconLarge As IntPtr, ByRef phiconSmall As IntPtr, ByVal nIcons As
Integer) _
As IntPtr
....
Dim iconPtr As IntPtr
Dim myIcon As Icon
ExtractIconEx(Application.ExecutablePath, 0, iconPtr, Nothing, 1)
-> returnvalue is number of icons found, so normally check for > 0
myIcon = Icon.FromHandle(iconPtr)
....
when "finished using" the icon:
DestroyIcon(iconPtr)
dominique