PC Review


Reply
Thread Tools Rate Thread

Default icon for custom file using C#

 
 
Maneesh
Guest
Posts: n/a
 
      11th Jan 2007
I have been trying to get a solution to this problem for quite sometime
now.

I produce custom files in my Windows Application (binary serialization
of some objects) with some extention, say "file.abc"

Now I want a default icon to be assigned to this file (like in Office,
the Excel/Word/etc. icon is assigned to appropriate extentions); so
that when somebody double clicks on the file, my application is started
with this file as a parameter, which I catch in Main().

Is there any elegant way of doing this in C# - maybe some setting I
have to include when created the Setup for the application, or maybe
some API I have to use in C# when creating this file.

Thanks in advance.

- Maneesh

 
Reply With Quote
 
 
 
 
Kevin Spencer
Guest
Posts: n/a
 
      11th Jan 2007
This can be done in a Setup/Deployment Project in Visual Studio, using the
"File Types" Window of the project.

--
HTH,

Kevin Spencer
Microsoft MVP
Bit Player
http://unclechutney.blogspot.com

Where there's a Will, there's a William.

"Maneesh" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I have been trying to get a solution to this problem for quite sometime
> now.
>
> I produce custom files in my Windows Application (binary serialization
> of some objects) with some extention, say "file.abc"
>
> Now I want a default icon to be assigned to this file (like in Office,
> the Excel/Word/etc. icon is assigned to appropriate extentions); so
> that when somebody double clicks on the file, my application is started
> with this file as a parameter, which I catch in Main().
>
> Is there any elegant way of doing this in C# - maybe some setting I
> have to include when created the Setup for the application, or maybe
> some API I have to use in C# when creating this file.
>
> Thanks in advance.
>
> - Maneesh
>



 
Reply With Quote
 
Maneesh
Guest
Posts: n/a
 
      11th Jan 2007
Thanks Kevin.

- Maneesh

Kevin Spencer wrote:
> This can be done in a Setup/Deployment Project in Visual Studio, using the
> "File Types" Window of the project.
>
> --
> HTH,
>
> Kevin Spencer
> Microsoft MVP
> Bit Player
> http://unclechutney.blogspot.com
>
> Where there's a Will, there's a William.
>
> "Maneesh" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> >I have been trying to get a solution to this problem for quite sometime
> > now.
> >
> > I produce custom files in my Windows Application (binary serialization
> > of some objects) with some extention, say "file.abc"
> >
> > Now I want a default icon to be assigned to this file (like in Office,
> > the Excel/Word/etc. icon is assigned to appropriate extentions); so
> > that when somebody double clicks on the file, my application is started
> > with this file as a parameter, which I catch in Main().
> >
> > Is there any elegant way of doing this in C# - maybe some setting I
> > have to include when created the Setup for the application, or maybe
> > some API I have to use in C# when creating this file.
> >
> > Thanks in advance.
> >
> > - Maneesh
> >


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is this a bug: Intead of custom icon location, custom web pageshortcuts in Favoroites > Properties > Change icon... > always show %SystemRoot%\system32\SHELL32.dll c627627 Windows XP Help 1 26th Mar 2011 08:35 PM
Custom Icon for an Excel File =?Utf-8?B?anBjbWFkZG9n?= Microsoft Excel Programming 7 10th May 2007 10:46 AM
[Cf 2.0] Custom file association and default icon Steve B. Microsoft Dot NET Compact Framework 2 29th Aug 2006 11:11 AM
Change default icon for custom form TedB Microsoft Outlook Contacts 1 9th Dec 2005 02:07 AM
Re: icon change with custom form for default attie Microsoft Outlook Form Programming 0 30th Aug 2003 05:03 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:53 AM.