Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Form reference in run-time
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00155075
Message ID:
00155095
Vues:
21
>VFP 5.0.
>Question about form reference in run-time. I have
>a file FORM1.SCX with a form,named MYFORM. When I try
>to manipulate with a form at run-time, such as -
>? myform.caption
>or
>? _screen.myform.caption
>I got a message,that such member (MYFORM) isn't found.
>I've tried DO FORM form1 NAME myform , but the result
>is the same :( What's wrong ?
>
>Sergey
>reware@cafe.redcom.ru

Sergy,

If it's not a formset your using, look at the linked clause of DO FORM in help. If you create an object reference variable thne use it in the name clause with linked, then you can access the form's methods and properties anytime, anywhere.
It saves me alot of headache...

In main:

public oMyForm

then:

do form myform name oMyForm linked

then anytime while form is instanciated:

if type(oMyForm) = 'O'
? oMyForm.caption
? oMyForm.WhatEver()
endi


HTH

Eric K.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform