473,322 Members | 1,846 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,322 software developers and data experts.

How to get the ICON from a file

Does anyone know how I can extract the Icon from a Program(like Excel) or a File (*.xls) and use that icon on a runtime generated button

I am using .NET 2003 with Framework 1.1 and I am coding in C#
The platforms are Windows 98 and up

I have an app that will call up a file and luanch it's Windows Associated program when I click on a button for that file. I would like the button to have the same Icon as the file is displayed in Explorer

I don't know what the file will be ahead of time, and the icon may be different on one system vs. another (i.e. a picture file may display Paint on one syatm or Photoshop on another) I am already getting the open file info from the registry

Randy
Jul 21 '05 #1
1 1307
I found this, I haven't tried it yet

ExtractIcon() and
ExtractIconEx(

I already generate thumbnails from the images, so I don't need the GetThumbNailImages() function
I'll try the other functions and let you know how it goes

Thanks
Jul 21 '05 #2

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

Similar topics

4
by: Tim Jarman | last post by:
Apologies in advance for the long post - I wanted to be sure I included all the relevant details. The answer is probably very, very simple. I am doing something stupid here, but I don't know what...
8
by: Ed Isenberg | last post by:
I notice that a lot of Web pages have an icon that is displayed preceding the URL in the place in the browser where the URL is displayed. When I bookmark or add this to Favorites the icon is also...
8
by: Adrian | last post by:
How do I put an icon on a form using code? Thank you.
2
by: Randall Powell | last post by:
I am in the process of developing a Windows Service which will: (1) monitor multiple network shares; (2) marshal text file transfers into an SQL Server 2000 instance; and (3) provide messaging...
2
by: Amjad | last post by:
Hi, I'm using the NotifyIcon to process some text files in the background periodically. I want to display one icon in the task bar when the program is in stand by mode, and I want to display...
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...
13
by: Lou | last post by:
if I add a new item (Solution Items) to my project and its an icon(.ico), how can I reference that file when I am coding, Do I have to also add it to an image control, I don't want the file to be...
3
by: Nina | last post by:
Hi there, I assigned icon for a window's form using form's Icon property at design time. Now I want to change the icon. I tried to replace the old icon with the new icon using form's Icon...
4
by: randy1200 | last post by:
I have a Windows application that previously had the company logo "MyCompany.ico" added to the upper left-most corner. The company has since issued a new version of "MyCompany.ico" that looks...
1
by: =?Utf-8?B?U3RldmVU?= | last post by:
I have a structure that contains both 32x32 and 16x16 icons plus some text. I want to write all this to an XML file so that I can recover the icons later in an application. Can someone tell me how...
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: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
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...
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: 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
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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.