Welcome! Log In Create A New Profile

Advanced

Is window open???

Posted by John Marrone 
John Marrone
Is window open???
October 01, 2008 11:47PM
Good Day All
I am doing a MDI application and I do not want to let the user open the same window twice. What do I do to prevent this. Is there some value I could check in the windows init to see if there is already the same window open and then abort the current window from loading.
Jimbo
Re: Is window open???
October 01, 2008 11:54PM
Hi John:

sAliasName is string = "Form_USTAMM"
IF WinStatus(sAliasName)<>NotFound THEN
	WinStatus(sAliasName,TopActive)
ELSE
	MDIOpen("Form_USTAMM",sAliasName ,"")
END

this will put the window - if open - into the foreground, otherwise it will open the MDI-child.

Regards, Guenter
John Marrone
Thanks Guenter. You the man!!
October 02, 2008 12:11AM
Thanks Guenter. You the man!!
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: