PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → Is the window open ?
Is the window open ?
Débuté par guillermo, 01 juil. 2005 02:21 - 7 réponses
Posté le 01 juillet 2005 - 02:21
Hi Forum:
can I know from the window "A" if the window "B" is open?
Thanks ... Guillermo
Posté le 01 juillet 2005 - 02:49
Hi Forum:
can I know from the window "A" if the window "B" is open?
Thanks ... Guillermo

That's very simple,
Just check the status of that window, by pulling out the window name.
If the result is -1; then there is your sign that windowA Doesent excists.
IF NotWindowA = -1 THEN
Info("WindowA is open")
Else
Info("WindowA is not open")
END
That's how I would be doing this
Posté le 01 juillet 2005 - 03:29
Thanks Sven:
Before your answer I try with WinStatus(WindowA), if the window is open, return code 0, if not return code 8.
Where can see this codes ?
Guillermo
Hi Forum:
can I know from the window "A" if the window "B" is open?
Thanks ... Guillermo
That's very simple,

Just check the status of that window, by pulling out the window name.
If the result is -1; then there is your sign that windowA Doesent excists.
IF NotWindowA = -1 THEN
Info("WindowA is open")
Else
Info("WindowA is not open")
END
That's how I would be doing this
Posté le 01 juillet 2005 - 10:27
Hi,

With the "Winstatus" you can know if your window is open :

IF WinStatus(my_window) = NotFound THEN
OpenChild(my_window+the_status)
END

Regards
Fred
Posté le 01 juillet 2005 - 12:42
F1 ?
Posté le 01 juillet 2005 - 14:20
Hi Guillermo,
see help for WinStatus:
Active
DisplayOnly
Grayed
OutsideScreen
NotFound
Invisible

Another way to detect more details (say some variables in a window) is an exception handler. Eg.
WHEN EXCEPTION IN
IF YourWindow.YourVariable = 2 THEN
END
DO
ERROR("Window isn't open or variable does not have value 2")
ELSE
INFO("Window value is 2")
END
HTH
Raimund
Thanks Sven:
Before your answer I try with WinStatus(WindowA), if the window is open, return code 0, if not return code 8.
Where can see this codes ?
Guillermo
Hi Forum:
can I know from the window "A" if the window "B" is open?
Thanks ... Guillermo
That's very simple,

Just check the status of that window, by pulling out the window name.
If the result is -1; then there is your sign that windowA Doesent excists.
IF NotWindowA = -1 THEN
Info("WindowA is open")
Else
Info("WindowA is not open")
END
That's how I would be doing this



http://www.invitec.com
Posté le 02 juillet 2005 - 00:21
Raimund thank for your answer.

Thanks to your intervention, I understood the way to use it.

I am trying to know Windev by means of their trial of the version 8.0. excuse if some questions are very obvious.

Contrarily to what Sven thinks, I use the F1 a lot.
Guillermo

Hi Guillermo,
see help for WinStatus:
Active
DisplayOnly
Grayed
OutsideScreen
NotFound
Invisible

Another way to detect more details (say some variables in a window) is an exception handler. Eg.
WHEN EXCEPTION IN
IF YourWindow.YourVariable = 2 THEN
END
DO
ERROR("Window isn't open or variable does not have value 2")
ELSE
INFO("Window value is 2")
END
HTH
Raimund
Thanks Sven:
Before your answer I try with WinStatus(WindowA), if the window is open, return code 0, if not return code 8.
Where can see this codes ?
Guillermo
Hi Forum:
can I know from the window "A" if the window "B" is open?
Thanks ... Guillermo
That's very simple,

Just check the status of that window, by pulling out the window name.
If the result is -1; then there is your sign that windowA Doesent excists.
IF NotWindowA = -1 THEN
Info("WindowA is open")
Else
Info("WindowA is not open")
END
That's how I would be doing this
Posté le 02 juillet 2005 - 00:35
Sven:
Although you don't believe it, I use the F1 a lot.
I didn't interpret the help correctly, if my question produced nuisance... excuses.
Guillermo
>F1 ?