Wrox Programmer Forums
|
Pro VB.NET 2002/2003 For advanced Visual Basic coders working .NET version 2002/2003. Beginning-level questions will be redirected to other forums, including Beginning VB.NET.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 7th, 2005, 04:18 PM
Authorized User
 
Join Date: May 2005
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default opening other fiels?

i am trying to open a .sln file in vb.net I know i can open .exe files with system.diagnostics.process.start(filepath)
but i do not know how to open other files such as .sln which is a vb.net solution which all of us have:) I ahve heard about setting up a openfile dialog box then settings its properties to the file i want but i havent tried it yet, it seems like vb would be powerfull enough to bypass this hokey way.
ty any help is apreciated:)

~~~~~~~~~~~~~~~~~~~~~
If you help me im fine, otherwise ill shoot you. :)

P.S. With a c a mera.
__________________
~~~~~~~~~~~~~~~~~~~~~
I\'m sorry for having a rude signature Peter. I\'m sorry for having a rude signature Peter. I\'m sorry for having a rude signature Peter. I\'m sorry for having a rude signature Peter. I\'m sorry for having a rude signature Peter. I\'m sorry for having a rude signature Peter. I\'m sorry for having a rude signature Peter. I\'m sorry for having a rude signature Peter. I\'m sorry for having a rude signature Peter. I\'m sorry for having a rude signature Peter.
 
Old June 9th, 2005, 07:08 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

When you say "open" do you mean that you wish to access the file or launch the default application associated with that file?

-Peter
 
Old June 9th, 2005, 05:18 PM
Authorized User
 
Join Date: May 2005
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default

launch the default application opening the file in it. IE opening a .txt file in notepad. Notepad pops up with the text it it. Hope that clafifies it more.

~~~~~~~~~~~~~~~~~~~~~
If you help me im fine, otherwise ill shoot you. :)

P.S. With a c a mera.
 
Old June 9th, 2005, 05:25 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Isn't this normally achieved in windows by just calling the file from a shell? Like opening a command prompt and typing in myfile.txt, which windows picks up and recognizes the .txt->notepad association and thus opens notepad. Could this be how it could work from a process start?

-Peter
 
Old June 10th, 2005, 08:44 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 540
Thanks: 0
Thanked 4 Times in 4 Posts
Default

You should be able to open solution files using system.diagnostics.processes.start.

You have a few options. One is you can just use:

System.Diagnostics.Process.Start("c:\[FilePath]\[SolutionName].sln")

Or substitute whatever type of file you want to open. This assumes that the operating system will know which application is the default application for the file you want to open. Mine already knows to associate solution files with visual studio (I assume most people's do)

If, however, yours doesn't you can also use:

System.Diagnostics.Process.Start("c:\[FilePath]\[SolutionName].sln", "devenv.exe")

which tells it explicitly what application to use to run the file.

J
 
Old June 14th, 2005, 05:30 PM
Authorized User
 
Join Date: May 2005
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default

oops i forgot to ty. Wel TY very much it works exactly how i wanted it to.

~~~~~~~~~~~~~~~~~~~~~
If you help me im fine, otherwise ill shoot you. :)

P.S. With a c a mera.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Opening with C# indhusundaram BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 0 August 2nd, 2008 01:57 AM
Opening a Form arholly Access 1 January 17th, 2007 11:59 AM
date fiels insertation problem geek.net ADO.NET 1 March 7th, 2006 06:36 AM
Before the opening Yulon ASP.NET 1.0 and 1.1 Basics 0 October 25th, 2005 05:19 AM
Multiple calulated fiels in one query? fdoosey Access 1 February 15th, 2005 09:17 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.