Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Methods of a different form
Message
From
05/03/1998 14:10:34
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00082558
Message ID:
00082776
Views:
29
>Just a curiousity question here. I have in the past used CreateObject for making forms.....but, I once posed the question of speed with CreateObject vs DO FORM. DO FORM wins hands down in my opinion and now I don't have any forms at all created with CreateObject. I'm wondering if you've run into that.

Not yet, but then again, my development machine is not a reliable test bed for speed (Pentium II/266)... :)

I will look for that in my work. Under what circumstances were you finding decreased speed? And how did you open files in the forms - did you add a DataEnvironment to the Form or did you USE the files? This will make a difference.

You can't get exactly the same effect using DO FORM, but you can come close with the following:

LOCAL loForm1, loForm2

DO FORM MyFirstForm NAME loForm1
DO FORM MySecondForm NAME loForm2 WITH loForm1

Note that DO FORM includes an inplicit Show() at the end of the Init() event, which will cause MyFirstForm to appear, and if MyFirstForm is modal, this code will not work at all, which is why the CreateObject() methodology is more flexible.
David M. Stowell
Ravenslake Consulting
Chicago, Illinois

e-mail: davidstowell@ravenslakeconsulting.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform