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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top