Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Return value from form after creating form in code
Message
De
25/08/2002 15:45:46
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00693423
Message ID:
00693441
Vues:
29
>Hilmar,
>
>I did a search and did not find the particular issue addressed.
>
>I'm working on command button class to popup a form with an oleCalendar on it, grab the selected value, and apply it to a field, textbox value, or form property. I would like the form and oleCalendar to be a single class, and the cmdButton.click() to be able instantiate it, run it, and do something with the date selected.

OK; I'm not sure this is the easiest way, but I believe you can achieve your purpose as follows:

  • Let's first suppose you call your custom object from another form. Call it with ThisForm as parameter.
  • In the calendar form, fetch the calling form in Form.Init(), and save it into a form property. Let's say this property is ThisForm.oCallingObject.
  • When closing your calendar form, save a value to ThisForm.oCallingObject.dSelectedDate.
  • Of course, the calling form must have this property.
  • You can also pass any other object as a parameter. Just make sure it has the required property.

    HTH, 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)
  • Précédent
    Suivant
    Répondre
    Fil
    Voir

    Click here to load this message in the networking platform