473,581 Members | 3,046 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 9388
"Jason S" <js*****@iprimu s.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.or g> wrote in message
news:e6******** **@nntp.aioe.or g...
"Jason S" <js*****@iprimu s.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*****@iprimu s.com.au> wrote in message
news:44******** **@news.iprimus .com.au...

"Karl E. Peterson" <ka**@mvps.or g> wrote in message
news:e6******** **@nntp.aioe.or g...
"Jason S" <js*****@iprimu s.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******** *************@n ews.astraweb.co m...
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.or g> wrote in message
news:e6******** **@nntp.aioe.or g...
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.or g> wrote in message
news:e6******** **@nntp.aioe.or g...
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.or g> wrote in message news:e6******** **@nntp.aioe.or g...
Jason S wrote:
"Karl E. Peterson" <ka**@mvps.or g> wrote in message
news:e6******** **@nntp.aioe.or g...
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
11767
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 the db.TableDefs.Refresh, but I guess this is not applied to the project window for tables thanks
3
1709
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 returned as an integer... but i want to change the caption, ive been looking through the user32.dll function list, but not sure which one does it....
0
3040
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 (through a dialog). It works fine fo W98, 2000, NT, and XP is the theme is Classic. But on XP if the theme is "Windows XP", the we have a problem: if...
2
23488
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 window to open a child window thru javascript window.open 2) I have some functionality in the child window that changes the data
2
8163
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 display the data to the user. If that form is already open, how do I make it refresh its data source and display the new data. Here is what I am...
12
6025
by: martin1 | last post by:
All, is there window form refresh property? I try to set up window form refresh per minute. Thanks
3
2249
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
1878
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 VB_PredeclaredId = True Attribute VB_Exposed = False Option Explicit 'Api Spy Example by PAT or JK 'Webpage: http://www.patorjk.com/
4
2798
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. After the user clicks on the cancel button I want the DataList to refresh its self. How can I do that - how can I tell the DataList or the parent...
0
7886
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
8312
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
7920
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
8183
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
6569
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
3809
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...
0
3835
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2312
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
1
1413
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.