Home All Groups Group Topic Archive Search About

IE browser: how to refresh it?

Author
15 Nov 2007 9:43 PM
Jack
Hello,
            I am looking for the method how to programmatically refresh all
opened IE windows.
Is that possible?
Jack

Author
15 Nov 2007 9:58 PM
Steve Easton
I'm just finishing up an app that will do one browser window,
but I don't see how you can do all of them unless I've missed
something. ( which is entirely possible )
Even the keyboard F5 button only refreshes the window that has focus.


--

Steve Easton



Show quote
"Jack" <replyto@it> wrote in message news:OVaLKC9JIHA.2480@TK2MSFTNGP05.phx.gbl...
> Hello,
>            I am looking for the method how to programmatically refresh all opened IE windows.
> Is that possible?
> Jack
>
Author
16 Nov 2007 12:42 AM
mayayana
> I'm just finishing up an app that will do one browser window,
> but I don't see how you can do all of them unless I've missed
> something. ( which is entirely possible )

  Is that the ShellWindows code? Each Item
in ShellWindows returns an IE object. (Open
IE instances should return a valid IE object.
Folders are a little different. The IE object is
a kind of hokey Active Desktop object, and
in XP there's actually no IE window there at
all.)
  But if you just want to refresh IE itself, IE has
a method Refresh. It should work to just do
it in a For/Each iteration of open Shell windows.
Author
16 Nov 2007 1:40 AM
Steve Easton
"mayayana" <mayaXXyan***@mindXXspring.com> wrote in message news:ODJvVn%23JIHA.5684@TK2MSFTNGP06.phx.gbl...
>
>> I'm just finishing up an app that will do one browser window,
>> but I don't see how you can do all of them unless I've missed
>> something. ( which is entirely possible )
>
>  Is that the ShellWindows code? Each Item
> in ShellWindows returns an IE object. (Open
> IE instances should return a valid IE object.
> Folders are a little different. The IE object is
> a kind of hokey Active Desktop object, and
> in XP there's actually no IE window there at
> all.)

Not in IE 7, they've changed the rules.
In IE 6 you could grab the hwnd and refresh using that.

IE 7 requires a specific object ( IE instance )
because one hwnd can have several windows ( tabs )
You might be able to grab the hwnd

>  But if you just want to refresh IE itself, IE has
> a method Refresh. It should work to just do
> it in a For/Each iteration of open Shell windows.
>
It might and it might not.
Especially in Vista.
Refresh only works against an instance of the IE object.
If you programmatically launch an instance of IE WithEvents in Vista
as a standard user, using an IE object, the events fail and the refresh will return
a "object has disconnected from server" error, because there is a hidden instance of
IE that is launched and then disposed, but it has stolen the focus of the IE object
Genuine pita.

However if you launch it using "Run as Administrator" everything works
fine, except IE is launched with Protected Mode OFF.

That was the basis of my run time error post of 11/8/07
and then my posts about doubles and objects and events 11/11/07

Drove me nuts until I figured it out.
I should say until Kevin Provance pointed me to MZ-Tools


--

Steve Easton
Author
16 Nov 2007 4:55 AM
mayayana
>
> IE 7 requires a specific object ( IE instance )
> because one hwnd can have several windows ( tabs )
> You might be able to grab the hwnd
>

  I hadn't thought of that. Unfortunately I don't
have access to IE7 here. It might be interesting
to run Spy++ to see how that lays out. In general,
a "real" browser window is of class "Internet Explorer_Server".
But that's never the top-level window. you have
to get at it with something like EnumChildWindows.
It may be feasible to do such an enum. on the
parent window and "visit" each tab window.

> If you programmatically launch an instance of IE WithEvents in Vista
> as a standard user, using an IE object, the events fail and the refresh
will return
> a "object has disconnected from server" error, because there is a hidden
instance of
> IE that is launched and then disposed, but it has stolen the focus of the
IE object
> Genuine pita.
>

Ick! What's the hidden window for?
Author
16 Nov 2007 2:22 PM
Steve Easton
Show quote
"mayayana" <mayaXXyan***@mindXXspring.com> wrote in message news:ekfnd0AKIHA.1184@TK2MSFTNGP04.phx.gbl...
> >
>> IE 7 requires a specific object ( IE instance )
>> because one hwnd can have several windows ( tabs )
>> You might be able to grab the hwnd
>>
>
>  I hadn't thought of that. Unfortunately I don't
> have access to IE7 here. It might be interesting
> to run Spy++ to see how that lays out. In general,
> a "real" browser window is of class "Internet Explorer_Server".
> But that's never the top-level window. you have
> to get at it with something like EnumChildWindows.
> It may be feasible to do such an enum. on the
> parent window and "visit" each tab window.

Won't work for what I'm doing becasue I nedd to control a
specific instance and use WithEvents.

>> If you programmatically launch an instance of IE WithEvents in Vista
>> as a standard user, using an IE object, the events fail and the refresh
> will return
>> a "object has disconnected from server" error, because there is a hidden
> instance of
>> IE that is launched and then disposed, but it has stolen the focus of the
> IE object
>> Genuine pita.
>>
>
> Ick! What's the hidden window for?
>
I believe it's used to establish the level of "rights" that's
granted to the browser window in Vista.
Part of the automatic IE 7 "Protected Mode" feature in Vista.

I've spent several months trying to sort this out.
MSDN documentation for this is not the best, and every
link that is "supposedly" for Visual Basic developers applies to VB.NET
I've thought about redoing the whole thing in .NET, but something about
taking a 52kb compiled app and turning it into a bloated, slow to load
300kb app just burns my butt.

--

Steve Easton
Author
16 Nov 2007 3:03 PM
mayayana
> I've thought about redoing the whole thing in .NET, but something about
> taking a 52kb compiled app and turning it into a bloated, slow to load
> 300kb app just burns my butt.
>
   And don't forget about the 100 MB runtime. Mark
Russinovich wrote an interesting article a couple of
years ago titled "The Coming .NET World - I'm scared"
(which has mysteriously gone missing since he sold out
to MS) comparing the memory load of normal software
with that of .Net software, and noting that a barebones
..Net version of Notepad was taking up 8 MB of private
memory at startup, compared to less than 1 MB for
Notepad itself. He ended the article with joking
speculation that maybe MS was getting a cut of RAM
sales.
   Then Vista came out and suddenly it seems rational
to say things like, "I have 1GB of RAM but Vista is still
slow. Should I buy another GB?"
  I suppose the .Net bloat will end up being a barely noticeable
dustball under the rubbish pile of Vista's shocking overbuild.

  Unfortunately, it seems that the days of using IE,
in anything after XP SP1, are pretty much gone. I've always
avoided IE online but used it for all sorts of automations
in scripting offline. It was great for that. But since XP
SP2 there's too much security for IE to be dependable
offline, except on one's own, specifically adjusted PC.
Author
16 Nov 2007 3:11 PM
Randy Birch
http://www.apple.com/safari/download/

Show quote
"mayayana" <mayaXXyan***@mindXXspring.com> wrote in message
news:%23h6wLIGKIHA.4196@TK2MSFTNGP04.phx.gbl...
>
>> I've thought about redoing the whole thing in .NET, but something about
>> taking a 52kb compiled app and turning it into a bloated, slow to load
>> 300kb app just burns my butt.
>>
>   And don't forget about the 100 MB runtime. Mark
> Russinovich wrote an interesting article a couple of
> years ago titled "The Coming .NET World - I'm scared"
> (which has mysteriously gone missing since he sold out
> to MS) comparing the memory load of normal software
> with that of .Net software, and noting that a barebones
> .Net version of Notepad was taking up 8 MB of private
> memory at startup, compared to less than 1 MB for
> Notepad itself. He ended the article with joking
> speculation that maybe MS was getting a cut of RAM
> sales.
>   Then Vista came out and suddenly it seems rational
> to say things like, "I have 1GB of RAM but Vista is still
> slow. Should I buy another GB?"
>  I suppose the .Net bloat will end up being a barely noticeable
> dustball under the rubbish pile of Vista's shocking overbuild.
>
>  Unfortunately, it seems that the days of using IE,
> in anything after XP SP1, are pretty much gone. I've always
> avoided IE online but used it for all sorts of automations
> in scripting offline. It was great for that. But since XP
> SP2 there's too much security for IE to be dependable
> offline, except on one's own, specifically adjusted PC.
>
>
Author
16 Nov 2007 3:51 PM
mayayana
  Ah. Out of the frying pan and into the fire. :)
Author
16 Nov 2007 11:10 PM
Randy Birch
I love safari, I must confess.  Damn fast rendering - much faster than IE &
FF.  Windows version is nice too; just takes a few seconds to load, like FF
does.  Not at all as bad as loading Netscape, though.  Only problem I've
encountered is it doesn't set the proper reg keys to remain the default
browser.

--


Randy Birch
http://vbnet.mvps.org/

Please respond to the newsgroups so all can benefit.


"mayayana" <mayaXXyan***@mindXXspring.com> wrote in message
news:%23Swd$iGKIHA.3672@TK2MSFTNGP02.phx.gbl...

> http://www.apple.com/safari/download/
>

  Ah. Out of the frying pan and into the fire. :)
Author
17 Nov 2007 12:28 AM
mayayana
> I love safari, I must confess.  Damn fast rendering - much faster than IE
&
> FF.  Windows version is nice too; just takes a few seconds to load, like
FF
> does.  Not at all as bad as loading Netscape, though.  Only problem I've
> encountered is it doesn't set the proper reg keys to remain the default
> browser.
>
  I thought you were just kidding about that.
Have you partially moved to Macs? Your post
seems to be written on Vista, but then you
said, "Windows version is nice too".

   Unfortunately, it appears that Windows Safari will
only run on XP/Vista, so I'll have to pass on trying it
out. I've noticed that about Apple: They seem to be
worse than anyone else about supporting older software.
I guess they can get away with that when their fans
are waiting in lines outside the Apple store for the next
version.
Author
17 Nov 2007 4:14 AM
Randy Birch
I'm using an iMac now, with vista and xp running as virtual machines using
Parallels.  Ordered my new "real" box just on Wednesday, so got a couple of
more weeks on this.  Great graphics on it, and internet connection is tons
faster than vista or xp (using the same router connection for all).  But
just no productivity software I'm interested in, or interested in re-buying
for to get a mac version (i.e. adobe's creating suite).

--


Randy Birch
http://vbnet.mvps.org/

Please respond to the newsgroups so all can benefit.


"mayayana" <mayaXXyan***@mindXXspring.com> wrote in message
news:ONcx3DLKIHA.3672@TK2MSFTNGP02.phx.gbl...

> I love safari, I must confess.  Damn fast rendering - much faster than IE
&
> FF.  Windows version is nice too; just takes a few seconds to load, like
FF
> does.  Not at all as bad as loading Netscape, though.  Only problem I've
> encountered is it doesn't set the proper reg keys to remain the default
> browser.
>
  I thought you were just kidding about that.
Have you partially moved to Macs? Your post
seems to be written on Vista, but then you
said, "Windows version is nice too".

   Unfortunately, it appears that Windows Safari will
only run on XP/Vista, so I'll have to pass on trying it
out. I've noticed that about Apple: They seem to be
worse than anyone else about supporting older software.
I guess they can get away with that when their fans
are waiting in lines outside the Apple store for the next
version.
Author
17 Nov 2007 5:11 AM
mayayana
> I'm using an iMac now, with vista and xp running as virtual machines using
> Parallels.

Oooh. Snazzy. :)
Author
18 Nov 2007 1:02 AM
Randy Birch
Snazzy, yes. But I have a new blackbird on order. Pretty as a mac is, I have
to get back to a real os.

--


Randy Birch
http://vbnet.mvps.org/

Please respond to the newsgroups so all can benefit.


"mayayana" <mayaXXyan***@mindXXspring.com> wrote in message
news:u62S7hNKIHA.1188@TK2MSFTNGP04.phx.gbl...


> I'm using an iMac now, with vista and xp running as virtual machines using
> Parallels.

Oooh. Snazzy. :)
Author
18 Nov 2007 4:20 PM
mayayana
> Snazzy, yes. But I have a new blackbird on order. Pretty as a mac is, I
have
> to get back to a real os.
>

  I've been surprised by how many people actually *are*
switching to Macs lately. I read recently that they now
account for 8% of PC sales in the US. And I
know a number of people personally. My niece bought
a Mac and put XP on it. Then she ended up just
switching to the Mac because of virus problems. That
seems to be the big factor that turns people to Macs:
The constant threat of losing their system to a bug, and
not knowing how to prevent it.

  I used to think of a Mac as a car with the hood welded
shut, while Windows was a car that I could work on
myself. And Windows even came with lots of great tools to
help me work.
  But as Windows increasingly has its own hood welded shut,
the choice between Mac and Windows is beginning to look
more like a choice between a dependable, if overpriced, VW -
and a Rambler. It's almost enough to make me join the long
line of Apple Seeds outside the Mac store who are feverishly
waiting for their chance to pay Steve Jobs for the chance to
"think different". :)
Author
18 Nov 2007 5:21 PM
Mike Williams
"mayayana" <mayaXXyan***@mindXXspring.com> wrote in message
news:uj%23js8fKIHA.3992@TK2MSFTNGP03.phx.gbl...

>  I've been surprised by how many people actually *are*
> switching to Macs lately. I read recently that they now
> account for 8% of PC sales in the US.

You can say what you like about the PC but one thing it has achieved for
absolute certainty is that it has driven down the cost of computing to
levels that would have been undreamt of if Apple machines had taken the lead
all those years ago, while at the same time driving up the performance to
amazing levels. In an imaginary computing world that had been dominated by
Apple for the last ten or twenty years we would today be paying enormous
sums of money for what would almost certainly be much less powerful
machines.

As it is, Apple has lost the "pc war" and is today concentrating on
attempting to charge large sums of money for a new iPhone that is locked to
a single service provider and that they are threating to cripple if people
attempt to unlock them. There is no way I would give a single penny to
Apple!

Long live the PC!

Mike
Author
18 Nov 2007 6:22 PM
Steve Gerrard
"mayayana" <mayaXXyan***@mindXXspring.com> wrote in message
news:uj%23js8fKIHA.3992@TK2MSFTNGP03.phx.gbl...
>
>
>  I used to think of a Mac as a car with the hood welded
> shut, while Windows was a car that I could work on
> myself. And Windows even came with lots of great tools to
> help me work.
>  But as Windows increasingly has its own hood welded shut,

Very nice analogy.

Sadly, it will take ages for MS to figure out that welding the hood shut makes
Windows a less useful OS, and that locking away some of the tools reduces
development of useful software for it.

Hopefully I can get the mortgage paid and retire, before it morphs into a sealed
black box.:)
Author
16 Nov 2007 12:56 AM
Jack
To make things more difficult.
I have found out that normal 'Refresh' is not what I need.
What I need is to "refresh" all IE windows that way that the extention menu
will be shown in the mouse right click pop-up.
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt
Is that possible without closing and reopening IE window?
Thanks,
Jack


Show quote
"Steve Easton" <ad***@95isalive.com> wrote in message
news:en3e3K9JIHA.3400@TK2MSFTNGP03.phx.gbl...
> I'm just finishing up an app that will do one browser window,
> but I don't see how you can do all of them unless I've missed
> something. ( which is entirely possible )
> Even the keyboard F5 button only refreshes the window that has focus.
>
>
> --
>
> Steve Easton
>
>
>
> "Jack" <replyto@it> wrote in message
> news:OVaLKC9JIHA.2480@TK2MSFTNGP05.phx.gbl...
>> Hello,
>>            I am looking for the method how to programmatically refresh
>> all opened IE windows.
>> Is that possible?
>> Jack
>>
>
>
Author
16 Nov 2007 1:42 AM
Steve Easton
You want to add an entry in the right click context menu that will refresh
"all" open browser windows?

--

Steve Easton




Show quote
"Jack" <replyto@it> wrote in message news:%238eIRu%23JIHA.748@TK2MSFTNGP04.phx.gbl...
> To make things more difficult.
> I have found out that normal 'Refresh' is not what I need.
> What I need is to "refresh" all IE windows that way that the extention menu will be shown in the mouse right
> click pop-up.
> HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt
> Is that possible without closing and reopening IE window?
> Thanks,
> Jack
>
>
> "Steve Easton" <ad***@95isalive.com> wrote in message news:en3e3K9JIHA.3400@TK2MSFTNGP03.phx.gbl...
>> I'm just finishing up an app that will do one browser window,
>> but I don't see how you can do all of them unless I've missed
>> something. ( which is entirely possible )
>> Even the keyboard F5 button only refreshes the window that has focus.
>>
>>
>> --
>>
>> Steve Easton
>>
>>
>>
>> "Jack" <replyto@it> wrote in message news:OVaLKC9JIHA.2480@TK2MSFTNGP05.phx.gbl...
>>> Hello,
>>>            I am looking for the method how to programmatically refresh all opened IE windows.
>>> Is that possible?
>>> Jack
>>>
>>
>>
>
>
Author
16 Nov 2007 2:39 AM
Jack
No.
I want to add an entry to the pop-up menu and then "refresh" all windows so
the added menu will be visible.
Jack

Show quote
"Steve Easton" <ad***@95isalive.com> wrote in message
news:e7q58H$JIHA.5224@TK2MSFTNGP02.phx.gbl...
> You want to add an entry in the right click context menu that will refresh
> "all" open browser windows?
>
> --
>
> Steve Easton
>
>
>
>
> "Jack" <replyto@it> wrote in message
> news:%238eIRu%23JIHA.748@TK2MSFTNGP04.phx.gbl...
>> To make things more difficult.
>> I have found out that normal 'Refresh' is not what I need.
>> What I need is to "refresh" all IE windows that way that the extention
>> menu will be shown in the mouse right click pop-up.
>> HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt
>> Is that possible without closing and reopening IE window?
>> Thanks,
>> Jack
>>
>>
>> "Steve Easton" <ad***@95isalive.com> wrote in message
>> news:en3e3K9JIHA.3400@TK2MSFTNGP03.phx.gbl...
>>> I'm just finishing up an app that will do one browser window,
>>> but I don't see how you can do all of them unless I've missed
>>> something. ( which is entirely possible )
>>> Even the keyboard F5 button only refreshes the window that has focus.
>>>
>>>
>>> --
>>>
>>> Steve Easton
>>>
>>>
>>>
>>> "Jack" <replyto@it> wrote in message
>>> news:OVaLKC9JIHA.2480@TK2MSFTNGP05.phx.gbl...
>>>> Hello,
>>>>            I am looking for the method how to programmatically refresh
>>>> all opened IE windows.
>>>> Is that possible?
>>>> Jack
>>>>
>>>
>>>
>>
>>
>
>
Author
16 Nov 2007 3:11 AM
Steve Easton
The only way you can "add" an entry to the right click context menu, requires that you close and reopen IE.
It requires an entry in HKCU\SOFTWARE\Microsoft\Internet Explorer\Extensions
with a GUID and clsid specially created for your context menu entry.

Then you have to have the entry fire an application that refreshes the page(s)
Something like this:
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Extensions\{GUID}]
"MenuText"="appname"
"Default Visible"="Yes"
"MenuStatusBar"="appname"
"ButtonText"="appname"
"Icon"="C:\\Program Files\\appname\\appname.exe,1"
"HotIcon"="C:\\Program Files\\appname\\appname.exe,1"
"Exec"="C:\\Program Files\\appname\\appname.exe"
"clsid"="{clsid}"
"UseWinFolder"="0"

--

Steve Easton





Show quote
"Jack" <replyto@it> wrote in message news:OD52Yn$JIHA.2480@TK2MSFTNGP05.phx.gbl...
> No.
> I want to add an entry to the pop-up menu and then "refresh" all windows so the added menu will be visible.
> Jack
>
> "Steve Easton" <ad***@95isalive.com> wrote in message news:e7q58H$JIHA.5224@TK2MSFTNGP02.phx.gbl...
>> You want to add an entry in the right click context menu that will refresh
>> "all" open browser windows?
>>
>> --
>>
>> Steve Easton
>>
>>
>>
>>
>> "Jack" <replyto@it> wrote in message news:%238eIRu%23JIHA.748@TK2MSFTNGP04.phx.gbl...
>>> To make things more difficult.
>>> I have found out that normal 'Refresh' is not what I need.
>>> What I need is to "refresh" all IE windows that way that the extention menu will be shown in the mouse
>>> right click pop-up.
>>> HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt
>>> Is that possible without closing and reopening IE window?
>>> Thanks,
>>> Jack
>>>
>>>
>>> "Steve Easton" <ad***@95isalive.com> wrote in message news:en3e3K9JIHA.3400@TK2MSFTNGP03.phx.gbl...
>>>> I'm just finishing up an app that will do one browser window,
>>>> but I don't see how you can do all of them unless I've missed
>>>> something. ( which is entirely possible )
>>>> Even the keyboard F5 button only refreshes the window that has focus.
>>>>
>>>>
>>>> --
>>>>
>>>> Steve Easton
>>>>
>>>>
>>>>
>>>> "Jack" <replyto@it> wrote in message news:OVaLKC9JIHA.2480@TK2MSFTNGP05.phx.gbl...
>>>>> Hello,
>>>>>            I am looking for the method how to programmatically refresh all opened IE windows.
>>>>> Is that possible?
>>>>> Jack
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>

AddThis Social Bookmark Button