General information
Category:
Forms & Form designer
>>>>I have a situation where instead of one large form, I'd like to have a bunch of smaller forms on the screen at once. This would allow the user to move them around or minimize them individually. All these forms are related to each other, so when the user does something on one form, it needs to affect the other forms.
>>>>
>>>>How do I refer to the controls on one form from another form? I'd also like them to use the same datasession. Basically, I want the control of one large form, but broken into smaller windows.
>>>>
>>>>Any ideas?
>>>>
>>>>-Michelle
>>>
>>>You should take care of app hierarchy. When you open a form you provide link to some external (e.g. app object property):
>>>DO FORM myform1 NAME oApp.myform1 LINKED
>>>Now you can refer to this form's controls from any point of you application:
>>>oApp.Myform1.Control1.Property1=...
>>>If you set your forms to use default datasession they all will share the same one.
>>
>>How do I make the oApp?
>>
>>Thanks,
>>
>>-Michelle
>
>The simplest oApp can be created in Main.Prg (first module of your app):
>oApp=createobject("clApp")
>do mainform
>read events
>return
>
>Define Class clApp as Custom
>.myform1=.Null.
>.myform2=.Null.
>...
>EndDefine
Ok, thanks!
-Michelle
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only