Solved

I have a form that has a lot of buttons. In which want some actions.C#

Posted on 2011-03-14
3
292 Views
Last Modified: 2012-05-11
Hi,

I have a form that has a lot of buttons. In which want some actions.C#

1 I have figured out some but wanted to know when button clicked how can i get the ipconfig results displayed on a new form.
2. Open Explorer/IE/Firefox on 3 different button clicks

regards
Raja
0
Comment
Question by:bsharath
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 13

Assisted Solution

by:agarwalrahul
agarwalrahul earned 150 total points
ID: 35135174
Please check the link for Ipconfig:

http://stackoverflow.com/questions/657225/how-to-create-command-application-like-run-command-for-vista

If you want to open page in IE - use this:

System.Diagnostics.Process process = new System.Diagnostics.Process();
process.StartInfo.FileName = URI;
process.Start();
0
 
LVL 11

Author Comment

by:bsharath
ID: 35135236
Thanks

System.Diagnostics.Process process = new System.Diagnostics.Process();
process.StartInfo.FileName = URI;
process.Start();

URI should i define anything
Cant we open the IE as from the system path directly when clicked?
0
 
LVL 15

Accepted Solution

by:
angus_young_acdc earned 350 total points
ID: 35137054
Yes you will have to state what the URI is.   You can also specify what URL you want Internet Explorer and Firefox to navigate to.  Please see the attached examples.
string ie = @"C:\Program Files\Internet Explorer\iexplore.exe";
            string ff = @"C:\Program Files\Mozilla Firefox\firefox.exe";
            string explorerLocation = @"C:\";

            System.Diagnostics.Process openIEProcess = new System.Diagnostics.Process();
            openIEProcess.StartInfo.FileName = ie;
            openIEProcess.StartInfo.Arguments = "www.yahoo.com";
            openIEProcess.Start();

            System.Diagnostics.Process openFFProcess = new System.Diagnostics.Process();
            openFFProcess.StartInfo.FileName = ff;
            openIEProcess.StartInfo.Arguments = "www.yahoo.com";
            openFFProcess.Start();

Open in new window

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Having just graduated from college and entered the workforce, I don’t find myself always using the tools and programs I grew accustomed to over the past four years. However, there is one program I continually find myself reverting back to…R.   So …
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question