How to pass a parameter to windows application form the way we can do in a web form
-
I'm using vb.net application form My form requests user to enter ID in text area to retreive some data for printing I want to know is it possible to pass this ID as a paramter when I call the web application form without requesting user to submit it I mean that I will send user link of the application form with the ID as a parameter just as we do in a web form.
-
I'm using vb.net application form My form requests user to enter ID in text area to retreive some data for printing I want to know is it possible to pass this ID as a paramter when I call the web application form without requesting user to submit it I mean that I will send user link of the application form with the ID as a parameter just as we do in a web form.
Naglaa Saeed wrote:
I mean that I will send user link of the application form
Your question doesn't make sense. There's no such thing. You cannot instantiate, or call, a windows form from a URL, at least, not in the way you're implying. Are you asking how to call a windows form from a web form?? Or, forgetting the web analogy, are you asking how to pass a username to a login form and execute the code on the login form, without the user typing the information into the form??
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
I'm using vb.net application form My form requests user to enter ID in text area to retreive some data for printing I want to know is it possible to pass this ID as a paramter when I call the web application form without requesting user to submit it I mean that I will send user link of the application form with the ID as a parameter just as we do in a web form.
You can use Parametrized constructor or Property if you want to pass a parameter from one Form to another.
Naglaa Saeed wrote:
I will send user link of the application form with the ID
In this case, you can use start your application with commandline argument. In main method check the argument and set the value accordingly.
-
I'm using vb.net application form My form requests user to enter ID in text area to retreive some data for printing I want to know is it possible to pass this ID as a paramter when I call the web application form without requesting user to submit it I mean that I will send user link of the application form with the ID as a parameter just as we do in a web form.
If I have understood you correctly, you might use commandline parameters to run your application, or as mentioned by crudeCodeYogi, by using parametrized constructors.