But when we double click on that file(example.ourextesion) & browse to open with our *.exe a problem will occured!
That is our exe will open but contain are not shown. So, what's the problem??
The problem is when we double click to open our *.exe,
but no one triger to our *.exe to open our file(example.ourextesion) ! - that's the problem!
So what will we do??
I t's very eassy to solve this problem, I upload a sample project for your understanding.
The main thing which we forget I writedown here.
We should look 2 things.
1.check the string args[] value in Program .cs &
2.write a consturcter to load the file in Form1.cs
In Program.CS file, the default code is:
|
It will modified to:
|
Now in your Main Form here is Form1, a constructer will need to open a file for double click.
The code is as folllows to open a file in RichtextBox,
|
Now you can open your extension (like *.tanmay) on double click your file in any location of your computer
Note: For first time browse your *.exe to open your file which have your own extension.
If you have registry idea then you do it in registry value.
Hope it will help you,
Thank You!

ankit guptaPosted Aug 9, 2013, 7:29 AM
sorry bt how my own etention file communicate with my exe ?? plz rply me ???
pankajPosted Dec 29, 2012, 2:49 PM
Thank You !!!!!! u r a saviour :)
Luis Fernando MoraesPosted Dec 10, 2012, 8:18 AM
excellent!!
Sekula OpancicPosted Nov 13, 2012, 10:30 AM
Thank you, saved me lot of troubles. Very elegant solution.
Tanmay SarkarPosted Jul 26, 2010, 12:47 AM
Thank you... but why you post twice?
rishi royPosted Jul 26, 2010, 12:09 AM
yup, i got that problem for long time, thanks.... now my app is able to open with db click on my file *.roy with my exe... thank you....
rishi royPosted Jul 26, 2010, 12:09 AM
yup, i got that problem for long time, thanks.... now my app is able to open with db click on my file *.roy with my exe... thank you....