Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating form variables
Message
From
01/01/2001 22:00:31
Les Chandra
Mastersoft Pty Ltd
Melbourne, Australia
 
 
To
01/01/2001 21:22:49
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00458327
Message ID:
00458360
Views:
15
>The first form calls the second form from a command button. "do form form1 name o124"
>
>I was using a command button on the second form to check its windowstate by using (o124.windowstate). At this point I would get the error that it couldn't find o124.


Your variable has gone out of scope - o124 will go out of scope as soon as the click event has finished.

As for the FORMS collection, you could try something like:

FOR 1 = 1 TO _SCREEN.FormCount
IF _SCREEN.Forms(i).Name = 'Form1'

oForm = _SCREEN.Forms(i)
nWindowState = oForm.WindowState
...
EXIT

ENDIF

ENDFOR

I am sure there are eleganter ways, but that should work.


HTH

Les
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform