473,666 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 InternetExplore r()...) 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.Diagnost ics.Process[] myProcesses =
System.Diagnost ics.Process.Get Processes();

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 22 '05 #1
3 2735
"BK" <br***********@ email.si> wrote in message
news:bv******** *@enews3.newsgu y.com...
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.


See KB Article KB176792 "HOWTO: Connect to a Running Instance of
Internet Explorer"
--
With best wishes,
Igor Tandetnik

"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken
Nov 22 '05 #2
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.Creat eObjRef(typeof( AxAxBrowse.AxAx Browser));

http://xpcoder.net

BK <br***********@ email.si> wrote in message news:<bv******* **@enews3.newsg uy.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 InternetExplore r()...) 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.Diagnost ics.Process[] myProcesses =
System.Diagnost ics.Process.Get Processes();

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 22 '05 #3
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 ShellWindowsCla ss();
string Temp;

foreach (InternetExplor er TempIE in SW)
{
Temp = Path.GetFileNam eWithoutExtensi on(TempIE.FullN ame).ToLower();
if (Temp.Equals("i explore"))
{
....
}
}
--
I also had problems when I want to compare two browser instances. Using
method Equals from InternetExplore r 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.Creat eObjRef(typeof( AxAxBrowse.AxAx Browser));

http://xpcoder.net

BK <br***********@ email.si> wrote in message news:<bv******* **@enews3.newsg uy.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 InternetExplore r()...) 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.Diagno stics.Process[] myProcesses =
System.Diagno stics.Process.G etProcesses();

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 22 '05 #4

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

Similar topics

3
710
by: BK | last post by:
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
3
4200
by: HorseGeek | last post by:
I can't find a cookie that my code is writing. The behavior of my webpages indicates that the cookie IS being written SOMEPLACE. However, I can't find it. My client does not want the code going into production unless they can actually see where the cookie is being written. They are concerned that the cookie may stay around after they leave the screen and grant authorization to other users to get to web pages that they are now allowed...
9
2181
by: JimO | last post by:
I'm a newbie at this and I can't seem to find a list properties names to change styles on the fly. So far I've been lucky and managed to guess the names such as BodyElement.style.marginTop = 0; BodyElement.style.paddingTop = 0; Can anybody direct me to a list of CSS properties available in javascript?
16
3078
by: Java script Dude | last post by:
Creating a method of object (Object.prototype.classOf ...) is not the correct way because of a (as expected) flaw in IE where DOM Elements does not inherit from Object. As a result it is best to create a stand alone method passing the object as an argument: ~~~~ CODE ~~~~ <div id=divTest></div>
3
70179
by: Sharon | last post by:
How can I find what MSXML version I have installed? -- Thanks Sharon
1
1439
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 for ur Quick Reply Rgrds.. Dinesh...
2
2109
by: mahamedha | last post by:
Hi Here I am using this line of code to know wether the java is disabled or enabled in IE. javaEnabled = window.navigator.javaEnabled(); It is working fine in mozilla fire fox but it is not working in IE. It always coming true.
6
2857
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 sentences but split('.') doesn't solve the whole problem because of possible periods in the middle of a sentence. So I have... ----------------
2
3087
by: WilliamWallace | last post by:
Hi, I'm pretty new to Python, and brand new to PAMIE, and I'm out of ideas on what to try on this. I'm running a simple test script to go to google, type something in the search box and search for it. Everything except the textAreaSet function works flawlessly. Here's the code:
0
8445
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8356
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8871
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8551
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7386
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6198
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4198
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4369
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2771
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.