Click here to Skip to main content
15,889,034 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi!
My Questions is if i clicked button1 google browser is open.
If i clicked button2 i want yahoo browser open and google browser close it.
I dont want to close the whole browser, just the tab I opened.
Hope i can get some solutions or idea from you guys~
C#
private void button1_Click(object sender, EventArgs e)
        {
           Process.Start("http://www.google.com");
        }

private void button2_Click(object sender, EventArgs e)
        {
            Process.Start("http://www.yahoo.com");
        }
Posted
Updated 3-Dec-13 19:27pm
v2

1 solution

ProcessStartInfo startInfo=new ProcessStartInfo("chrome.exe", "http://www.google.com/");
            Process.Start(startInfo) ;
 
Share this answer
 
Comments
FresherBoy 4-Dec-13 20:29pm    
Thanks for replying!
Reshma Babu 5-Dec-13 2:31am    
Welcome :)
RikinPatel 7-Sep-16 23:02pm    
How this solution is work? I tried but its now working can anyone explain in detail..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900