Check Window

Hello again guys,

I was working on my project and am needing a way to check if a window is open (i.e. is there a command that searches to see if a window is open and returns a value if it is)

Please note: I HAVE read the manual and can find nothing which answers my question.

many thanks,





You don't say whether this is a real window, i.e. one created by TrueCtrl or a logical window created by TB. I will assume it is a real window.
The first thing you need to understand is that when you press the CLOSE button, you just hide the window - it is still open but hidden!
You also need to understand that windows can be ACTIVE and/or TARGET. ACTIVE is when the window is in front. TARGET is where the output goes to. You can have a hidden window as the TARGET. Normally windows are both ACTIVE and TARGET.
You can find out which window is ACTIVE with:
CALL Winfo ("ask active", n$)
To make a window both active and target use:
CALL TC_Win_Switch (val(n$))

Big John

- I just re-read this and

- I just re-read this and realised it might not come across the way I intend it to.

Basically, in my program I have a section where the user can click a button and a window opens. This window has a close function (just the normal X in the top right hand corner) however the program acts like the window is still open and I need to somehow get out (or stop the program enterring) the loop which displays this window.

Many thanks,