Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
How to call a form and pass it parameters
Hi all,
I have a form with two buttons. One says Add, the other Edit. They then call a form named frmEdit. But if this is an Add, I want to pass a parameter to the form to tell it to treat things as an Add (vs. Edit mode.)
If I call the forms show method, it appears, but in Edit mode. I can add code after the .show call that then changes the properties, but this only works if the form is not modal.
So my questions are:
1) Can I "open"/instantiate a form without it first being visible?
2) Can I pass a parameter to a form (via the Load or non-existant show method)?
3) Can I access the .Show method I call to make the form appear even though it is not in the list of available methods? In other words, can I just create a form_show with a set of arguments?
4) What would I do if the form were to be modal (or is it persist?)
5) Is there a better way to call up a form other than using the .Show method?
6) The load is the first method that fires when a form is created. The activate fires everytime the form is activated (I think.) Is there a place I can write code that only executs once, but after all the controls have been instantiated?
Thanks,
Fletcher
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement