By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,165 Members | 1,499 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,165 IT Pros & Developers. It's quick & easy.

How to loop though open forms

P: n/a
Hi

I have an application that opens a new form displaying an alert for every
new alert the system receives. The code is running on a timer in a separate
thread and all the alert forms are opened using the following code:

dim nAlert as frmAlert
nAlert.Text = "Alert " & AlertID
nAlert.Show()

When the timer runs again I need to check that the alert form is not already
displayed so as not to display the same alert form twice.

So I need a way of looping through all the open forms and checking the
forms.text property. Can anybody help me with this?

Many thanks in advance, Peter

Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi,

Here is a link on how to create a forms collection.
http://msdn.microsoft.com/library/de...et05132003.asp

Ken
------------------------
"Peter" <pe***@tyler-online.co.uk> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl...
Hi

I have an application that opens a new form displaying an alert for every
new alert the system receives. The code is running on a timer in a separate thread and all the alert forms are opened using the following code:

dim nAlert as frmAlert
nAlert.Text = "Alert " & AlertID
nAlert.Show()

When the timer runs again I need to check that the alert form is not already displayed so as not to display the same alert form twice.

So I need a way of looping through all the open forms and checking the
forms.text property. Can anybody help me with this?

Many thanks in advance, Peter

Nov 20 '05 #2

P: n/a
Thanks, that worked a treat.

Peter

"Ken Tucker" <vb***@bellsouth.net> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hi,

Here is a link on how to create a forms collection.
http://msdn.microsoft.com/library/de...et05132003.asp
Ken
------------------------
"Peter" <pe***@tyler-online.co.uk> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl...
Hi

I have an application that opens a new form displaying an alert for every new alert the system receives. The code is running on a timer in a

separate
thread and all the alert forms are opened using the following code:

dim nAlert as frmAlert
nAlert.Text = "Alert " & AlertID
nAlert.Show()

When the timer runs again I need to check that the alert form is not

already
displayed so as not to display the same alert form twice.

So I need a way of looping through all the open forms and checking the
forms.text property. Can anybody help me with this?

Many thanks in advance, Peter


Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.