Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C# (http://www.go4expert.com/forums/c-sharp/)
-   -   How to use delegate and event in userControl ? (http://www.go4expert.com/forums/delegate-event-usercontrol-t26155/)

beginner.nguyen 28Jun2011 06:23

How to use delegate and event in userControl ?
 
Hi all,
I have create a userControl name is UserControl1. On this usercontrol, I create a button name is btnAdd. I create 2 form name are Form1 and Form2. And then I add UserControl1 on those form. I want to when I click btnAdd button on Form1 then show string "this is form 1", if I click btnAdd button on Form2 then show string "this is form 2".

I want to use delegate and event to do that. Could you help me.
Thank you very much. :cryin:


All times are GMT +5.5. The time now is 22:54.