473,326 Members | 2,124 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,326 software developers and data experts.

VB to refresh IE window based on caption

Hi, is there any way of getting my VB (6.0) program to automatically
'Refresh' an IE window that might be active (window status not applicable).
It needs to be able to determine which active IE window to refresh, based on
its caption.

For example, there is a web site that I want to keep active where I normally
have to refresh it manually before it times out (every 15 min or so). I
might be doing something else at the time so I don't want to have to refresh
it manually every time (sometimes I even forget), but I want this web page
to be remain active unless I manually close it.
Can this be done?

Please include code if possible or refer me to a site that may assist.

Regards,

Jason.
Jun 12 '06 #1
8 9373
"Jason S" <js*****@iprimus.com.au> wrote in message
news:44**********@news.iprimus.com.au...
Hi, is there any way of getting my VB (6.0) program to automatically
'Refresh' an IE window that might be active (window status not applicable). It needs to be able to determine which active IE window to refresh, based on its caption.

For example, there is a web site that I want to keep active where I normally have to refresh it manually before it times out (every 15 min or so). I
might be doing something else at the time so I don't want to have to refresh it manually every time (sometimes I even forget), but I want this web page
to be remain active unless I manually close it.
Can this be done?

Please include code if possible or refer me to a site that may assist.


Easiest way is to create a frameset that includes the page you want to
update every X minutes, then include this tag in the header:

<meta http-equiv="Refresh" content="300">

Where "300" is the number of seconds before the page is automatically
refreshed. Far less overhead than trying to do it with a separate process!
Jun 13 '06 #2

"Karl E. Peterson" <ka**@mvps.org> wrote in message
news:e6**********@nntp.aioe.org...
"Jason S" <js*****@iprimus.com.au> wrote in message
news:44**********@news.iprimus.com.au...
Hi, is there any way of getting my VB (6.0) program to automatically
'Refresh' an IE window that might be active (window status not

applicable).
It needs to be able to determine which active IE window to refresh, based

on
its caption.

For example, there is a web site that I want to keep active where I

normally
have to refresh it manually before it times out (every 15 min or so). I
might be doing something else at the time so I don't want to have to

refresh
it manually every time (sometimes I even forget), but I want this web
page
to be remain active unless I manually close it.
Can this be done?

Please include code if possible or refer me to a site that may assist.


Easiest way is to create a frameset that includes the page you want to
update every X minutes, then include this tag in the header:

<meta http-equiv="Refresh" content="300">

Where "300" is the number of seconds before the page is automatically
refreshed. Far less overhead than trying to do it with a separate
process!


Thanks Karl, but I don't understand what you mean =( especially about the
frameset. Could you please be a little more specific? I am still learning.

Ta
Jason.

Jun 14 '06 #3
Karl means create your own web page that uses 'frames' (only one frame
required), and set the page for the contents portion to be the page you want
to refresh frequently. In the header for your frame page, you will add the
META tag Karl mentioned, which when displayed in the browser will reload the
page at the interval selected. You would then, instead of loading the
remote site page in the browser, load instead your local HTML fame page
file, which once loaded in the browser would do the loading and refreshing
of the remote site automatically.

Throw this in notepad, save with a html extension, and then click. It will
load yahoo, and do the same every 10 seconds until the browser is closed.

The 'trick' of this is that by using a frame you are loading the yahoo site
inside your own page, and as such you can control aspects of its display.
If you want to reload every 30 seconds, change the 10 in the META tag to 30.

<html>

<head>
<title>New Page 1</title>
<meta http-equiv="Refresh" content="10;URL=http://www.yahoo.com/">

</head>

<frameset rows="*">
<frame name="main" src="http://www.yahoo.com/" scrolling="auto"
target="_self">
<noframes>
<body>

<p>This page uses frames, but your browser doesn't support them.</p>

</body>
</noframes>
</frameset>

</html>
--

Randy Birch
MS MVP Visual Basic
http://vbnet.mvps.org/

Please reply to the newsgroups so all can participate.


"Jason S" <js*****@iprimus.com.au> wrote in message
news:44**********@news.iprimus.com.au...

"Karl E. Peterson" <ka**@mvps.org> wrote in message
news:e6**********@nntp.aioe.org...
"Jason S" <js*****@iprimus.com.au> wrote in message
news:44**********@news.iprimus.com.au...
Hi, is there any way of getting my VB (6.0) program to automatically
'Refresh' an IE window that might be active (window status not

applicable).
It needs to be able to determine which active IE window to refresh, based

on
its caption.

For example, there is a web site that I want to keep active where I

normally
have to refresh it manually before it times out (every 15 min or so). I
might be doing something else at the time so I don't want to have to

refresh
it manually every time (sometimes I even forget), but I want this web
page
to be remain active unless I manually close it.
Can this be done?

Please include code if possible or refer me to a site that may assist.


Easiest way is to create a frameset that includes the page you want to
update every X minutes, then include this tag in the header:

<meta http-equiv="Refresh" content="300">

Where "300" is the number of seconds before the page is automatically
refreshed. Far less overhead than trying to do it with a separate
process!


Thanks Karl, but I don't understand what you mean =( especially about the
frameset. Could you please be a little more specific? I am still learning.

Ta
Jason.

Jun 14 '06 #4

"Randy Birch" <rg************@mvps.org> wrote in message
news:44*********************@news.astraweb.com...
Karl means create your own web page that uses 'frames' (only one frame
required), and set the page for the contents portion to be the page you
want
to refresh frequently. In the header for your frame page, you will add the
META tag Karl mentioned, which when displayed in the browser will reload
the
page at the interval selected. You would then, instead of loading the
remote site page in the browser, load instead your local HTML fame page
file, which once loaded in the browser would do the loading and refreshing
of the remote site automatically.

Throw this in notepad, save with a html extension, and then click. It will
load yahoo, and do the same every 10 seconds until the browser is closed.

The 'trick' of this is that by using a frame you are loading the yahoo
site
inside your own page, and as such you can control aspects of its display.
If you want to reload every 30 seconds, change the 10 in the META tag to
30.

<html>

<head>
<title>New Page 1</title>
<meta http-equiv="Refresh" content="10;URL=http://www.yahoo.com/">

</head>

<frameset rows="*">
<frame name="main" src="http://www.yahoo.com/" scrolling="auto"
target="_self">
<noframes>
<body>

<p>This page uses frames, but your browser doesn't support them.</p>

</body>
</noframes>
</frameset>

</html>
--

Randy Birch
MS MVP Visual Basic
http://vbnet.mvps.org/

Please reply to the newsgroups so all can participate.

Hi Randy,

I tried this, and the page loaded and all, but it only refreshed *once* and
that was it. ?
It's supposed to loop is it?

Jason
Jun 14 '06 #5
Jason S wrote:
I tried this, and the page loaded and all, but it only refreshed
*once* and that was it. ?
It's supposed to loop is it?


Yeah, and it probably did, but since the content hadn't changed you didn't
see it. Try it on a page that changes, like this:
http://www.timeanddate.com/worldclock/
--
Jun 14 '06 #6

"Karl E. Peterson" <ka**@mvps.org> wrote in message
news:e6**********@nntp.aioe.org...
Jason S wrote:
I tried this, and the page loaded and all, but it only refreshed
*once* and that was it. ?
It's supposed to loop is it?


Yeah, and it probably did, but since the content hadn't changed you didn't
see it. Try it on a page that changes, like this:
http://www.timeanddate.com/worldclock/
--

Sorry Randy, but it's just not happening for me =(
I changed it to the above website like you suggested, but the times stayed
the same!
Something's wrong.

I have IE 6 with SP2. Does that make any difference?

Jason.
Jun 15 '06 #7
Jason S wrote:
"Karl E. Peterson" <ka**@mvps.org> wrote in message
news:e6**********@nntp.aioe.org...
Jason S wrote:
I tried this, and the page loaded and all, but it only refreshed
*once* and that was it. ?
It's supposed to loop is it?


Yeah, and it probably did, but since the content hadn't changed you
didn't see it. Try it on a page that changes, like this:
http://www.timeanddate.com/worldclock/


Sorry Randy, but it's just not happening for me =(
I changed it to the above website like you suggested, but the times
stayed the same!
Something's wrong.


Ah, I see the problem. Randy actually redirected you to the site in
question, rather than just refresh the current page. Here's a new copy of
that file. In a nutshell, change the meta tag to be more like this:

<meta http-equiv="Refresh" content="10">

Adjust the number of seconds appropriately.

Later... Karl
--


Jun 15 '06 #8

"Karl E. Peterson" <ka**@mvps.org> wrote in message news:e6**********@nntp.aioe.org...
Jason S wrote:
"Karl E. Peterson" <ka**@mvps.org> wrote in message
news:e6**********@nntp.aioe.org...
Jason S wrote:
I tried this, and the page loaded and all, but it only refreshed
*once* and that was it. ?
It's supposed to loop is it?


Yeah, and it probably did, but since the content hadn't changed you
didn't see it. Try it on a page that changes, like this:
http://www.timeanddate.com/worldclock/


Sorry Randy, but it's just not happening for me =(
I changed it to the above website like you suggested, but the times
stayed the same!
Something's wrong.


Ah, I see the problem. Randy actually redirected you to the site in
question, rather than just refresh the current page. Here's a new copy of
that file. In a nutshell, change the meta tag to be more like this:

<meta http-equiv="Refresh" content="10">

Adjust the number of seconds appropriately.

Later... Karl
--


Beautiful, thanks Karl and Randy =)
Have a good one

Jason.


Jun 16 '06 #9

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

Similar topics

3
by: Danny | last post by:
HI How can I refresh the main project window in code in ms access 2000 For example, I create a new table, but when I minimize the form, the table is not there until I do F5 (refresh). I do...
3
by: Brian Henry | last post by:
does anyone know the user32.dll function or how i can do this? I want to set the caption of a window based on the handel i specify... i already have the functions to get the handel of the window...
0
by: Chenghui Li | last post by:
We have a problem with the Windows XP theme: We have a IDE which allows other developers to develop visual programs for their customers. Our IDE allow them to set font for window captions easyly...
2
by: Raj | last post by:
Hi All, I have a problem with trying to refresh the parent window from child window in order to update data in the parent window. The sequence of events are 1) I click a button in the parent...
2
by: Robert | last post by:
I am trying to give the user dynamic search capabilities to select almost any record in the database from criteria they select. Everything seems to work except when I open the display form to...
12
by: martin1 | last post by:
All, is there window form refresh property? I try to set up window form refresh per minute. Thanks
3
by: martin1 | last post by:
Hi, All, is there anyway to refresh window-based application every minute? it is like web-based application refresh by setting up <meta-equiv="refresh" content ="60">. Thanks
0
by: kloplop321 | last post by:
I found this code(vb only) and it does about the same thing(in vb, not vb .NET 2005) Attribute VB_Name = "Form1" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute...
4
by: Peter | last post by:
ASP.NET 3.5 I have a web page and this web page has a DataList, when user hovers the mouse over a picture in the datalist a popup appers, this popup is a User Control and it has a cancel button....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
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: 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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.