Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to Copy a Object ??
Message
From
29/08/1999 21:24:29
 
 
To
28/08/1999 10:04:43
Vinod Parwani
United Creations L.L.C.
Ad-Dulayl, Jordan
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00258802
Message ID:
00259014
Views:
28
>x=Thisform
>
>Holds a object reference for that object but how I can make a seperate copy of object...something like..
>
>x=Copyof(Thisform)




You need a Form Class and an Instance to use.

You can Download SaveAs in File Section to save the Form into class VCX.

What you can do:

Local myForm

myForm=CreateObject("FCustomer")
myForm.Show

Or...

IF PEMSTATUS(_SCREEN, "FCustomer1", 5)
_SCREEN.ADDOBJECT("FCustomer1", "FCustomer")
ENDIF

_SCREEN.FCustomer1.Show


Notes:

if you change the form into class, there will NO DE.
You need to set all Open Table as needed!

* Form.Load
IF !Use("Customer")
Use Customer AGAIN in 0 Order Tag Cust_No Shared
ENDIF
=CursorSetProp("Buffer", 3, "Customer")

IF !Use("Orders")
Use Orders AGAIN in 0 Order Tag Ord_No Shared
Select Customer
Set Relation To Cust_No Into Orders Additive
ENDIF
=CursorSetProp("Buffer", 3, "Orders")

* etc.




But if you just want to Copy the Form into another Formset..
I don't think you can copy all with easy..
I will type {CTRL+A} to select all Objects in Form
{CTRL+C} to Copy, but the form properties and new procedure... need to copy manually! ~_~
The weak wait for chance, The strong bid for chance,
The clever notch up chance, but The merciful give you chance.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform