Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Which comes first
Message
From
26/01/2004 12:20:56
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
26/01/2004 12:12:31
Joel Hokanson
Services Integration Group
Bellaire, Texas, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00870624
Message ID:
00870628
Views:
14
>Which comes first on a form Init or Load?
>
>I want to open a table, store a value to a memvar and use trhat memvar as teh control source for a text box.
>
>When should I do that?

Load() comes before Init(). Specifically, Form.Load() is executed before the Init() of contained objects, Form.Init() is executed after the Init() of contained objects.

This makes Load() the ideal place to prepare tables, since otherwise, contained controls may report an error (could not bind controlsource, or something similar).

Also, since Form.Init() executes after the Init() of the contained objects, you can control the contained objects from there, for instance, change the .Visible or the .ReadOnly property, depending on some condition.

Greetings,

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform