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

Loading a file with other programs

How do I load a file(folder) with notepad , internet explorer and explorer
in a C# program?

Nov 15 '05 #1
2 1369
Hi,

The sample code below:

using System.Diagnostics;

// Notepad
Process process = new Process();
process.StartInfo.FileName = "notepad";
process.StartInfo.Arguments = "myFile.txt";
process.StartInfo.UseShellExecute = true;
process.Start();
process.WaitForExit();

// Windows Explorer
Process process = new Process();
process.StartInfo.FileName = "explorer";
process.StartInfo.Arguments = "c:\temp";
process.StartInfo.UseShellExecute = true;
process.Start();
process.WaitForExit();

// IE
Process process = new Process();
process.StartInfo.FileName = "file:///e:/temp/myfile.txt";
process.StartInfo.Arguments = "";
process.StartInfo.UseShellExecute = true;
process.Start();
process.WaitForExit();

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"Tomomichi Amano" <to*********@hotmail.com> wrote in message
news:Oz**************@tk2msftngp13.phx.gbl...
How do I load a file(folder) with notepad , internet explorer and explorer
in a C# program?


Nov 15 '05 #2
Hi,

Your question is not very clear, if what you want to do is start a new
process you can use System.Diagnostics.Process class, this allow you to
especify the command line you want.

hope this help,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Tomomichi Amano" <to*********@hotmail.com> wrote in message
news:Oz**************@tk2msftngp13.phx.gbl...
How do I load a file(folder) with notepad , internet explorer and explorer
in a C# program?

Nov 15 '05 #3

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

Similar topics

6
by: rxl124 | last post by:
someone please please help w/ this one. As I been working on this on and off and it just does not want to work. 1 #!/usr/bin/perl -w 2 3 $file = "/home/user1/dothis"; 4 open(FILE, ">$file");...
1
by: Niklas Lagergren | last post by:
Hi, I'll try to explain. I'm now using C# and I have an xmlfile that contains users and information about them, this xmlfile can be read and changed from many threads in my application, as many...
3
by: Sujan Datta | last post by:
What are the possible effects of modifying an existing header file, which includes bunch of defines, function prototypes and some struct definitions. The structure of the header file looks...
2
by: Abhishek Srivastava | last post by:
I am reading applied .net programming by Jeffrey Richter. I am reading about how the CLR gets loaded. From what I understand, that for all other OSes except (XP, 2003 Server) the CLR is loaded by...
3
by: joannax | last post by:
Hi, I am an experienced programmer in several languages, but new to VB .NET. I am designing an application which consists of a single "menu" program/form that selectively transfers control to...
2
by: Jean Pierre Daviau | last post by:
When I have something like this in a js file. listeImg = new Array(); listeImg = new Image(w,h); listeImg.src = "centre1.jpg"; etc Are the images loaded after the page is loaded? In the same...
28
by: larpup | last post by:
I have computers setup with A97 runtime with mde's. Work perfectly. I've written an app in 2003 and purchased the Developer extensions. When I load A2003 runtime with my app on a computer that...
5
by: Jaime Palli | last post by:
I have developed a Visual Basic 6.0 ActiveX DLL to help to interact with some ASP pages. I have copied the compiled DLL in C:\INETPUB\WWWROOT in my XP Pro machine. After making some configuracion...
20
by: Nickolai Leschov | last post by:
Hello all, I am programming an embedded controller that has a 'C' library for using its system functions (I/O, timers, all the specific devices). The supplied library has .LIB and .H files. ...
5
by: DR | last post by:
Why is its substantialy slower to load 50GB of gzipped file (20GB gzipped file) then loading 50GB unzipped data? im using System.IO.Compression.GZipStream and its not maxing out the cpu while...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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.