Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Accessing forms through a program script (.prg)
Message
 
 
To
25/09/2003 04:38:14
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00832050
Message ID:
00832255
Views:
17
Robert,

Well first off what part of modal don't you understand? *bg* Modal means that the form will not return to the line of code after the DO FORM command until the modal form is closed.

Second, you have to iterate the _screen.Forms collection and check a property like Name to find the form.

What are you really tying to accomplish here? If you want to initialize some fields you could pass the initialization values into form1's Init(). You could also put the values into a cursor or parameter object and let the controls be bound to the fields/properties.

>Unfortunately, it only works if form2 is modeless.
>
>Here's my sample script
>(test.prg)
> do form form1
> do form form2 */ form windowtype = modal
>
> _screen.Forms[1].Text1.Value = "test"
> Read events
>
>the output of this program will enter the value "test"
>to the Text1 of form1 instead on form2.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform