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

Document open on double-click?

I used to know how to do this--I want to double-click on a document created
by my application and have the application and the document open. I have
created the file association in my deployment project, and double-clicking a
document does open my app. But it doesn't open the document.

I recall that the path to the document gets passed to my app as a command
line argument, and My app has to use that path to open the document.. But I
can't remember how to get the path, and I can't find the answer anywhere
online--not even the Google crawler has it.

So, here's my question: How do I get the path to the document that was
clicked, so that I can have my app open the document?

At this point, I'm not trying to do anything fancy, like preventing a second
instance of my app from opening if an instance is already running. All I
want to do is get the path. How do I do that?

Thanks in advance.

--
David Veeneman
Foresight Systems
Jan 20 '06 #1
3 2405
Hello David,

Assuming that you have a Main function that accepts string[] args, can you
check the parameters?

HTH,
r.
I used to know how to do this--I want to double-click on a document
created by my application and have the application and the document
open. I have created the file association in my deployment project,
and double-clicking a document does open my app. But it doesn't open
the document.

I recall that the path to the document gets passed to my app as a
command line argument, and My app has to use that path to open the
document.. But I can't remember how to get the path, and I can't find
the answer anywhere online--not even the Google crawler has it.

So, here's my question: How do I get the path to the document that was
clicked, so that I can have my app open the document?

At this point, I'm not trying to do anything fancy, like preventing a
second instance of my app from opening if an instance is already
running. All I want to do is get the path. How do I do that?

Thanks in advance.

Jan 20 '06 #2
For the benefit of anyone else researching the question, here are a couple
of MSDN articles on point:

http://msdn.microsoft.com/library/de...rgumentspg.asp

http://msdn.microsoft.com/library/de...rstutorial.asp

--
David Veeneman
Foresight Systems
Jan 20 '06 #3
That simple? Thanks.
Jan 20 '06 #4

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

Similar topics

1
by: Myrilath | last post by:
I was just wondering how I should go about printing an html document. I can read it in and print it out as source but I would like to print it as it should display. At the moment I hace been having...
6
by: Mike Daniel | last post by:
I am attempting to use document.write(pageVar) that displays a new html page within a pop-up window and the popup is failing. Also note that pageVar is a complete HTML page containing other java...
2
by: Brett Baisley | last post by:
Hello I have a block of html code that I want to run by calling a javascript function to print it. Its basically a table with menu items in it that is the same for many pages, and instead of...
15
by: lawrence | last post by:
Is this the correct way to test for a method before I use it? createRange() is, I believe, an IE only method. function wrapSelectionInTag(selection, tag) { if (document.selection.createRange)...
3
by: Andy Davis | last post by:
I have set up a mail merge document in Word 2003 which gets its data from my Access 2000 database. I want to set up a button on a form that: 1. runs the query to provide the dat for the merge...
5
by: John Smith | last post by:
Hey folks, I'm creating an MS Word document in a C# Windows application. Because the client base has so many different versions of Word they are using, I opted to go with late binding to create...
2
by: Colin Halliday | last post by:
I have a Word 2003 mail merge main document (form letter) that is linked to another Word document data source for the mail merge. If I open this doc using the Word GUI, it first asks me to...
4
by: ianyian | last post by:
hi experts, im doing some staff bween th the aspx + MS Word.chellcheck, and and which running on my ypc is no problem ( windows xp , activation by ASPNET ), buts someshow when i try to deploy to...
3
by: Jens Jensen | last post by:
Does Microsoft now support Document style web service as part of .NET 3.0 (Windows communication foundations)?
8
by: gazza67 | last post by:
Hi, I want to do something that I thought would be simple but i cant seem to work it out, perhaps someone out there could help me. I want to browse for a file (it will be a word document),...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.