bring form to top

gibbo1715
02-11-2006, 02:15 AM
Is there an easy way to first check if a form is open, if it is bring it to the top else open it?

Cheers

Gibbo

anthony_n
02-11-2006, 03:54 AM
use form.show to load it
and formx.setfocus to bring it to the top
to look at what is loaded

dim frm as form

for each frm in forms
if typeof frm is form then
debug.? frm.name
end if
next

Iceplug
02-11-2006, 05:24 AM
Actually, when you're looping the forms in the Forms collection, it is practically guaranteed that you're going to get something that is a form.
If TypeOf frm Is form Then
http://www.xtremevbtalk.com/showthread.php?t=244976&highlight=form+loaded
:)

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum