Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Distributed Applications / November 2003

Tip: Looking for answers? Try searching our database.

Working with windows files

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Andrés - 24 Oct 2003 19:25 GMT
I´m working with C#. And my question is:
How can i open a file with its win application?. For
example open a word file with MS Word? or an excel file
with MS excel?
I´m trying to find the way to open a windows application
with its path; or to open a file with its path.
Thanks.
Eric Cadwell - 27 Oct 2003 19:30 GMT
Try just starting a process with the path of the file. That should load the
registered program:
System.Diagnostics.Process.Start(@\\file2\home$\ecadwell\Desktop\status.doc)
;

HTH;
Eric Cadwell
http://www.origincontrols.com
Sriram Krishnan [at] gmx [dot] net - 01 Nov 2003 18:55 GMT
Try using the ShellExecute API function through PInvoke

Sriram

> I´m working with C#. And my question is:
> How can i open a file with its win application?. For example open a word
> file with MS Word? or an excel file with MS excel? I´m trying to find the
> way to open a windows application with its path; or to open a file with
> its path.
> Thanks.

Signature

Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

Santiago - 03 Nov 2003 21:40 GMT
No need to PInvoke.
Follow Eric's method. It's the easiest and cleanest. Plus it's pure managed
code.

- Santiago

> Try using the ShellExecute API function through PInvoke
>
[quoted text clipped - 6 lines]
> > How can i open a file with its win application?. For example open a word
> > file with MS Word? or an excel file with MS excel? I?m trying to find
the
> > way to open a windows application with its path; or to open a file with
> > its path.
> > Thanks.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.