Click to See Complete Forum and Search --> : Problem while clicking link(Win Forms)


Ganapatisb
September 1st, 2009, 03:53 AM
Hi Friends,

I have one win form where there is a one labellink. When i click on that link it opens pop up window in IE7 explorer. When you click on same link it opens another pop up tab in IE. But i have to avoid that. When you click on that link it should display same tab which is already opened instead of creating new tab. I have tried with

System.Diagnostics.Process proc

and i have written code like this


try

{

if (proc.HasExited)

{

proc =


Process.Start("iexplore.exe", "www.google.com");

}

else

{

MessageBox.Show("Window is Already Opened!!");
}

}
catch
{
proc = Process.Start("iexplore.exe","www.google.com");
}

But here the problem is when you close opened tab and keep another empty tab , click on that link it says that Message already opened.

I dont know how to solve this. Please give me solution if you know this..
Thanks in advance..

BigEd781
September 1st, 2009, 11:54 AM
Here is a good example which shows you two ways to enumerate through each open IE tab.

http://www.eggheadcafe.com/community/aspnet/2/10112932/there-are-two-ways-that-i.aspx

That said, you should be using the user's preferred browser, not strictly IE. Of course, that would make this more difficult :).