Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Communicating between forms
Message
From
06/10/1998 15:41:22
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00143896
Message ID:
00144344
Views:
24
>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?

Launch the other forms from .show of the main form, and keep references to them in an array property (just like what Jayesh's third answer proposes). Then you can say this.OtherForms[4].cboTripList.refresh and things like that.

> I'd also like them to use the same datasession.

If you instantiate them from the main form, pass the main form's DataSessionID as a parameter to these forms, and in their Inits you may have

Lparam DSID
Set datasession to DSID

(I saw Fast Eddie said that you may open the other forms with a default datasession, so they just use what's already open, so this may be completely unnecessary)

> Basically, I want the control of one large form, but broken into smaller windows.
>
> Any ideas?

I've had a form like this, and it was full of buttons which opened subforms which were mostly dialogs for this or that, search grids or just memo editing windows. You may actually show/hide these forms as necessary, and let the user arrange them around. You may want to use an .ini file to remember their positions to restore them for the next time. The whole setup actually sounds very feasible, though it also sounds it will take a substantial amount of time and messages on UT :)

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform