open custom extnsion files with cutom applications using c#.net

  • Thread starter Thread starter Christof Nordiek
  • Start date Start date
C

Christof Nordiek

Hi Yoshita,
in a Setup-Project you can add filetypes and connect them with your
application.
 
Hi
I am developing a C#.Net windows application for my project.
In that project I have an IDE to work on. The application is similar to
Adobe Photoshop.

My requirement is as follows.
1) I must be able to save my work in a file with custom file extention
(similar to *.PSD in photoshop)
2) After I save my work, if I double click on that file, my work should be
opened with my application automatically and I need to be able to work on
that as usual.
(similar to *.psd file, if we open that file, the file will be opened in
photoshop automatically)

How to do this functionality programatically?
(when we double click the file, my application has to be opened and file
must be opened in that application.)
Please help me out from this situation and guide me in right direction ASAP.

Thanks in advance
Kiran
 
Hi,

The full Path of the file will be the one commandline argument, when your
app ist
started by doubleclicking a file. (it's the %1 in the command in the
registry)
To acces the name use following code:

static int Main(string [] args)
{
if (args.Count == 1)
{
string fileName = args[0]
}
....
}
 
The below link guided me very well up to now...
http://www.blackwasp.co.uk/ProgrammaticFileTypes.aspx

Finally I am able to open my application when I double click the file which
is having my custom extention.

But here I have one problem,

My application is cbr.exe, and the file extention is *.cbw

I am able to generate myFile.cbw,
I am able to get my own icon for cbw file type.
I am able to run "cbr.exe when *.cbw files are double clicked in the
explorer.

But I could not be able to read the myFile.cbw file content when cbr.exe is
run.
I want to read the file contents of cbw files which I double click and open
with my application "cbr.exe"
When I click the file (which has custom extention, say *.xyz) I am able to
run my application. I could not be able to read the file with my application
at the time of opening it with my application.

Please help me out from this situation

thanks
kiran
 

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