473,569 Members | 3,040 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 2728
"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...
3
4196
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...
9
2177
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
3070
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
70147
by: Sharon | last post by:
How can I find what MSXML version I have installed? -- Thanks Sharon
1
1435
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
2104
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
2853
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
3081
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
7703
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...
0
7930
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. ...
0
8138
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7681
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...
0
7983
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6290
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...
0
3662
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...
1
2118
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
0
950
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.