Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
LISA G Who?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00856120
Message ID:
00856835
Vues:
19
First a warning I don't use Codebook's foundation. Anything I say here applies generically. This is all using the command line.

1. Instatiate a Form object with x=Createobject("form").
2. Add a textbox with Addobject()
3. Set Visible = .t. First for the textbox then the form.(You'll notice that the form is NOT the active form.)
4. type x.Show() The form will now activate and be set to the active form. It will also set the textbox as the active control on the form.

Hope this answers your question,

Richard




>>If you were to create a form (scx) and use DO FORM instead of CreateObject() to instantiate your object, then the LISA G holds true. Remember when you use CreateObject() VFP sets the objects visibility to .F.. I only remember READ EVENTS being necessary for an executable to run.
>
>>Richard
>
>Ah ha!
>
>All of my forms are the VCX type. I've just followed the lead of the CodeBook based foundation that I use and that's the way they do it.
>
>Now, a further question. Say I've done L-I with CREATEOBJECT AND S-A with .show(). The way DOFORM from CODEBOOK assigns focus to the form is to execute goForm.oBizObj.setfocus(). All of their forms have a business object based on CONTAINER.
>
>Now is there any way to set focus to a form without looking inside to see what objects are there? I tried form.click() but that doesn't set focus. I know I can explicitly execute form.gotfocus() but I assume this is not equivalent to actually giving the form focus.
>
>I'm looking for a programmatic equivalent to clicking on the form.
>
>Thanks for the help.
>
>BTW, I've noticed that leaving the DOFORM program will set focus to the created and shown form even if I don't execute READ EVENTS. At that point GOTFOCUS fires.
>
>Peter
State of Florida, DCF
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform