Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Createobject
Message
 
To
27/05/2005 04:57:32
Daryl Dunkley
Pegasus Software Limited
Kettering, United Kingdom
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Title:
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01018038
Message ID:
01018039
Views:
13
Not a perfect solution, but you could set the name property of your forms after they are created...

aa = createobject("form")
aa.name = "form1"
bb = createobject("form")
bb.name = "form2"

If you need them to be sequential based on how many forms there are up in _screen then you could use _screen.formcount in some fashion.

If the desire is simply to have a unique name for every form that is instantiated then you can use sys(2015)

...if you have your own form subclass that you are using, then you could put code in the class definition's init event to automatically name the form's based on your needs and requirements. This would at least allow you to write the code in a single place and restore the behavior that you saw in VFP 6.

>can you please help me.
>
>we are running this simple code:
>
>
>and we have noticed a different between VFP6 and VFP9.
>
>VFP6 creates the object as:
>
>aa.name = "form1"
>bb.name = "form2"
>
>
>VFP9 creates the object as:
>
>aa.name = "form"
>bb.name = "form"
>
>
>is there anyway to make vfp9 create the objects as it does in vfp6?
>
>
>thanks
>
>daryl
Previous
Reply
Map
View

Click here to load this message in the networking platform