Solved

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

Posted on 2011-03-14
3
268 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
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Reset asp.net login password 4 42
Bartender label printing - switch on and off graphics 3 38
Question! 4 36
2 questions 10 25
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 …
When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

776 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