Click here to Skip to main content
15,868,016 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
hi freind's.

i want send control user cntrol in method click buttom?

MY project is winform.

user control project is external project(project test).
user control load in project main. (load project test in project main)

And load in a new tab to the desired number.

sample picture: [^].

sample video: [^].
Posted
Updated 22-Dec-14 20:39pm
v4
Comments
BillWoodruff 23-Dec-14 1:44am    
Details ? Send a "UserControl" from what to what: from one Form to another, from one Class to another Class ? WinForms ? WPF ?
Sergey Alexandrovich Kryukov 23-Dec-14 1:46am    
What does it mean, to "send a control"? and "method click button"? The question makes no sense at all. I'm not even asking for clarifications...
—SA
BillWoodruff 23-Dec-14 2:33am    
"I'm not even asking for clarifications..." Thanks for sharing :)
Sergey Alexandrovich Kryukov 23-Dec-14 9:58am    
:-)
[no name] 23-Dec-14 2:37am    
I explained to my photos and videos.

Content inappropriately posted as a "solution" by the OP relocated to the original question.
 
Share this answer
 
v2
Comments
Deepu S Nair 23-Dec-14 2:01am    
Use 'Improve Question' link to update question.Don't add your question as solution.
Declare an event handler publicly to do so in your user control. call the same in the event through which you want to pass it suppose you want to pass your user control on click event of button on your user control call this handler.

Declaration :
public EventHandler handler;


Call:

C#
protected void btn_Click(object sender, EventArgs e)
        {
...
            handler(sender, e);
            ......
        }


Now you can use this as an event with your usercontrol on the form you are using it...
 
Share this answer
 
v2
Comments
[no name] 23-Dec-14 2:29am    
sample video : http://uploadboy.com/2zregr1f14r3.html

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900