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
"Cor" <no*@non.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi Herfried,
Can you give me that routine dominique is using, I will try it also.
But finding out that wheel that you have 10000 times done, you know I will
distribute it only with your name.
Cor