473,320 Members | 2,117 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Retrieve Icon Graphic given icon handle

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
Nov 21 '05 #1
1 1216
>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

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Terry | last post by:
There are a number of things about using unmanaged resources in Windows Forms programming that is unclear to me. In C++, if you loaded an icon resource using "ExtractIcon()", the resource was...
2
by: Dickyb | last post by:
Extracting an Icon and Placing It On The Desktop (C# Language) I constructed a suite of programs in C++ several years ago that handle my financial portfolio, and now I have converted them to...
0
by: Carl Mercier | last post by:
(I'm using C# 2.0) Hi, I have placed an icon file in resources.resx. The problem is that I don't know how to retrieve it. In VB.NET 2.0, My.Resources.MyIcon does the trick, but what's the...
2
by: Mamatha | last post by:
Hi I want to add an icon to the textbox's text. I don't know how to display icon in textbox in VB.NET. If any one knows please let me know. Thanks in advance. Mamatha
8
by: Joachim | last post by:
Hello everybody! I am currently developing a sidebar-application and getting stucked in the problem of extracting the default application icon of .exe and .dll files. Has anybody out there a...
5
by: IcingDeath via DotNetMonster.com | last post by:
I am building this SQL Server database app in which i can store files. In order to display files I want to have the app show the associated icon for the extension of the file that is in the...
6
by: Pieter | last post by:
Hi, I need to have the icon of the assembly that is calling my Control.Library. Using 2.0 Framework the "Drawing.Icon.ExtractAssociatedIcon" does the trick. But this fucntion doesn't exist in...
1
by: vovan | last post by:
I created an icon in VS2005 and assign it to Icon property of one of the form in my project. I see the graphic I created in Properties window of the form, but instead of the graphic I created there...
0
by: pantagruel | last post by:
Hi, I have a design that requires a graphical button to be placed on a line that basically functions as a border around a div. normally I would just try to absolutely position the graphic, but...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.