Open a form from a windows control

G

Guest

Hello All,

I have created a windows control using C#, which has some textboxes and a
datagrid, I want to add an event handler to the datagrid, when the user
clicks on a specific row it should open an instance of a form that exist in
the application which will user that control.
The problem is how can I declare the instance of that form (the form
constructor takes 2 parameters) in the control?

Thanks

Regards,
 
P

poojo hackma

It depends on how your constructor for your NewForm is used, what your
parameters are, etc.

Try something like this:

Parameter1 param1;
Parameter2 param2;
NewForm1 = new NewForm(param1, param2);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top