Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to call a form and pass it parameters
Message
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00569379
Message ID:
00569387
Views:
25
Look in the FAQ (or in the downloads) for a message I have posted that use a form like a function. It will answer most of your questions.

I can't give you the exact URL now because FAQ and Downloads are not accessible.

>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
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform