Hi,
>>
I always programing with form designer but I 'm looking the way that I can use the dataenviromnet in a source code.
<<
Something like :
WITH this.Dataenvironment
.AddObject("Cursor1","cursor")
WITH .Cursor1
.Alias = "MyAlias"
.CursorSource = "MyFile"
ENDWITH
.AddObject("Cursor2","cursor")
ENDWITH
called from Form.Load
Relation objects can also be added in this way. Inspect the available properties for these objects from the DE in the form designer for other properties which you will probably need to set (e.g. BufferModeOverRide, Order etc)
It's also worth bearing in mind that you can sub-class the DE,Cursor and Relation objects if required.
HTH,
Viv