Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help on Help - Name Property
Message
 
 
À
23/07/1998 03:26:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00120091
Message ID:
00120535
Vues:
31
David,

I use the .Name property in my udf used to disable menu items. The SKIP FOR is:
FormRunning( "frmTheFormName" )
* FormRunning.PRG 08-Mar-98

* determine if a particular form is running. 

* It checks the Name property

lparameter pcFormName

local i, llRetVal

llRetVal = .f.
pcFormName = upper( pcFormName )

for i = 1 to _screen.FormCount
   if ( upper( _screen.Forms[i].Name ) == pcFormName )
      llRetVal = .t.
      exit
   endif
endfor

return llRetVal
So yes you can "use" the form .Name property to look for a form. But you can't manipulate the form via it's .Name. The only time .Name is used for anything of consequence is when there is object containership involved. If the form is part of a formset then things change a little. Then the form .Name distinguishes one form from another, just like .txtFirstName is different that .txtLastName inside the same container.

>Anyway, "name" clearly means lots of different things here too.
>Is the name of the scx the name of the form. No!
>When we DO FORM myFormName
>we're talking about the name of the scx. Once instantiated the name of the form can be quite different. (For some peculiar reason my forms are named the same as the SCX with an frm in front)
>I don't really want to reference a form by name, although I often want to know if a form of a given name is running already (and there could be many). I would like to know if you *can* refer to a form by name.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform