Retrieve Icon Graphic given icon handle

  • Thread starter Thread starter Mark Hollander
  • Start date Start date
M

Mark Hollander

Hi All,

I have a function the gets the Icon handle from a running application, How
can I convert this to an icon graphic so that I can use it in a listview
(vb.net)

Public Function StandardIconHandle(ByVal hWindow As Integer) As
Integer
Dim lpdwResult As Integer
Dim oMsg As New WindowsAPI.Messaging
If oMsg.SendMessageWithTimeout(hWindow,
Messaging.APISendMessage.GETICON, APIIcons.BIG, 0&,
Messaging.APISendMessageTimeOut.ABORTIFHUNG, lpdwResult) Then
If lpdwResult <= 0 Then
lpdwResult = Me.GetClassLong(hWindow,
ClassTypes.HICON)
End If
End If
Return lpdwResult
End Function


Thanks in advance
 
I have a function the gets the Icon handle from a running application, How
can I convert this to an icon graphic so that I can use it in a listview
(vb.net)

Icon.FromHandle()


Mattias
 
Back
Top