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

C#: How to find out IE's URL

BK
Hi all!

I am a total newbie on this stuff and I am probably asking for
an answer for very stupid (simple) problem.
Well..

I would like to write a C# application that checks URLs where
user go/surf by using IE. I found on the internet how to do that
by launching own instance of IE (new InternetExplorer()...) and then
with the help of events in shdocvw.dll I can see where the user is
surfing. This works fine.
But... I have a problem of detecting URLs of the browser that is not
started with my application. How can I find appropriate instance
of the browser and 'connect' to it so that I could know its URL.
I know that by using

System.Diagnostics.Process[] myProcesses =
System.Diagnostics.Process.GetProcesses();

and then traversing through names of the process and searching
for 'iexplore' I can find the process data about the already launched
IE. But what next??

How can I find out at which URL is that alread launched IE?

Please help... I need this quit urgently:(

Regards to all,
Branko

P.S.: Please respond to my e-mail too, because I have difficulties
using news:(

Nov 15 '05 #1
2 16459
You will need to use remoting. Im sorry I dont have to create the
example for you. But here is:

// something like this but you need to take care of remoting issues
// before you can do this.

// remembet that these processes are in different application domains.
ObjRef or = myprocess.CreateObjRef(typeof(AxAxBrowse.AxAxBrows er));

http://xpcoder.net

BK <br***********@email.si> wrote in message news:<bv*********@enews3.newsguy.com>...
Hi all!

I am a total newbie on this stuff and I am probably asking for
an answer for very stupid (simple) problem.
Well..

I would like to write a C# application that checks URLs where
user go/surf by using IE. I found on the internet how to do that
by launching own instance of IE (new InternetExplorer()...) and then
with the help of events in shdocvw.dll I can see where the user is
surfing. This works fine.
But... I have a problem of detecting URLs of the browser that is not
started with my application. How can I find appropriate instance
of the browser and 'connect' to it so that I could know its URL.
I know that by using

System.Diagnostics.Process[] myProcesses =
System.Diagnostics.Process.GetProcesses();

and then traversing through names of the process and searching
for 'iexplore' I can find the process data about the already launched
IE. But what next??

How can I find out at which URL is that alread launched IE?

Please help... I need this quit urgently:(

Regards to all,
Branko

P.S.: Please respond to my e-mail too, because I have difficulties
using news:(

Nov 15 '05 #2
BK
Hi!

I tried the resource from Igor and it worked fine.
For anybody else, in C# it was something like that:

--
ShellWindows SW = new ShellWindowsClass();
string Temp;

foreach (InternetExplorer TempIE in SW)
{
Temp = Path.GetFileNameWithoutExtension(TempIE.FullName). ToLower();
if (Temp.Equals("iexplore"))
{
....
}
}
--
I also had problems when I want to compare two browser instances. Using
method Equals from InternetExplorer was not working in all cases and
then I used comparing via property HWND which works ok.

Thanks!!!

Branko

Coder Coder wrote:
You will need to use remoting. Im sorry I dont have to create the
example for you. But here is:

// something like this but you need to take care of remoting issues
// before you can do this.

// remembet that these processes are in different application domains.
ObjRef or = myprocess.CreateObjRef(typeof(AxAxBrowse.AxAxBrows er));

http://xpcoder.net

BK <br***********@email.si> wrote in message news:<bv*********@enews3.newsguy.com>...
Hi all!

I am a total newbie on this stuff and I am probably asking for
an answer for very stupid (simple) problem.
Well..

I would like to write a C# application that checks URLs where
user go/surf by using IE. I found on the internet how to do that
by launching own instance of IE (new InternetExplorer()...) and then
with the help of events in shdocvw.dll I can see where the user is
surfing. This works fine.
But... I have a problem of detecting URLs of the browser that is not
started with my application. How can I find appropriate instance
of the browser and 'connect' to it so that I could know its URL.
I know that by using

System.Diagnostics.Process[] myProcesses =
System.Diagnostics.Process.GetProcesses();

and then traversing through names of the process and searching
for 'iexplore' I can find the process data about the already launched
IE. But what next??

How can I find out at which URL is that alread launched IE?

Please help... I need this quit urgently:(

Regards to all,
Branko

P.S.: Please respond to my e-mail too, because I have difficulties
using news:(


Nov 15 '05 #3

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

Similar topics

1
by: Mr. x | last post by:
Hello, I have IE 6.0, and I want to support also old versions of Internet explorer. I don't know how can I check this out ? Please help. Many people also advise me using frames. What...
8
by: Jim Cochrane | last post by:
(I suspect there might be a better NG to ask this in - corrections to this effect are welcome.) I use an NT 4 machine for my Windows development and, thinking it would be a good idea to have IE...
8
by: Brian | last post by:
I am working on a restaurant's web site, and am having trouble with IE 6/Win2k and the menu pages: http://www.tsmchughs.com/menus/lunch http://www.tsmchughs.com/menus/dinner When the page is...
6
by: Robert Nurse | last post by:
Hi, Is it at all possible to capture and suppress the backspace key when focus is not on a form edit control? Basically, while the page is loading I don't want the user pressing the backspace...
0
by: DraguVaso | last post by:
Hi, I need my VB.NET-application kind search through all the Internet Explorer-windows for a browser-window that is opened on a given URL. If it finds such a browser-windiw, it should put it to...
1
by: pearturtle123 | last post by:
Hi, I am new to Python and I am using PAMIE to manipulate IE browser. Currently, I have IE window 1 launched, after I clicked on a link on window 1, a second IE window 2 isopened. Then, I want...
1
by: balakrishnan.dinesh | last post by:
hi frnds I need to know that, how to find IE browser supports the xml file . Is there any code to find that support or is there any other to find , Im asking about IE browsers alone.. Waiting...
4
by: Gordon | last post by:
Just a quickie. Is there a way to cause a browser to open it's find... dialogue in response to an event, say a click on a button? The idea is that there's a list of addresses that a client has...
5
by: annaGold | last post by:
Hello, I wrote this simple javascript to demonstrate my problem with IE6 & 7. The code works find in Mozilla, but in IE my email link on the page is changed to the new href. Only href should change,...
6
by: chrispoliquin | last post by:
I am using regular expressions to search a string (always full sentences, maybe more than one sentence) for common abbreviations and remove the periods. I need to break the string into different...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.