Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
LISA G Who?
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00856120
Message ID:
00856541
Views:
23
>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.
>
>I tested this with VFP8SP1 and created a form based off of the Form base class. I put ? "{event name}" in each of the events. Three events (Load, Init, Show) print on the VFP desktop and two print on the form (Activate and Gotfocus).
>
>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 .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.

Peter
Peter Robinson ** Rodes Design ** Virginia
Previous
Reply
Map
View

Click here to load this message in the networking platform