How to make the button in Usercontrol call Usercontrol's Click event 
Author Message
 How to make the button in Usercontrol call Usercontrol's Click event

I create user control with 1 button in it. What statement
or syntax to do this. When clicking at button,it will call
or raise usercontrol's event click.


Sun, 04 Sep 2005 17:26:05 GMT  
 How to make the button in Usercontrol call Usercontrol's Click event
In the click event of the button, have you tried:

RaiseEvent Click(Me, New System.EventArgs())

--
Remember: There's no place like 127.0.0.1
==============================================
Happy To Help,
Tom Spink

http://dotnetx.betasafe.com >> VB, VB.NET, C#, C++ Code
Happy Coding!!

Please respond to the newsgroups, so all can benefit.

One day

Quote:
> I create user control with 1 button in it. What statement
> or syntax to do this. When clicking at button,it will call
> or raise usercontrol's event click.



Mon, 05 Sep 2005 01:41:11 GMT  
 How to make the button in Usercontrol call Usercontrol's Click event
I try it but it cause syntax error. It saind 'Derieved
class can not raise base class event'
Quote:
>-----Original Message-----
>In the click event of the button, have you tried:

>RaiseEvent Click(Me, New System.EventArgs())

>--
>Remember: There's no place like 127.0.0.1
>==============================================
>Happy To Help,
>Tom Spink

>http://dotnetx.betasafe.com >> VB, VB.NET, C#, C++ Code
>Happy Coding!!

>Please respond to the newsgroups, so all can benefit.

>One day


>> I create user control with 1 button in it. What
statement
>> or syntax to do this. When clicking at button,it will
call
>> or raise usercontrol's event click.

>.



Mon, 05 Sep 2005 12:30:48 GMT  
 How to make the button in Usercontrol call Usercontrol's Click event
Hi, then try making your own event:

Event Click(ByVal sender As Object, ByVal e As System.EventArgs)

(put this at the top of your class)

then...
RaiseEvent Click(Me, New System.EventArgs())

--
Remember: There's no place like 127.0.0.1
==============================================
Happy To Help,
Tom Spink

http://dotnetx.betasafe.com >> VB, VB.NET, C#, C++ Code
Happy Coding!!

Please respond to the newsgroups, so all can benefit.

One day

Quote:
> I try it but it cause syntax error. It saind 'Derieved
> class can not raise base class event'
> >-----Original Message-----
> >In the click event of the button, have you tried:

> >RaiseEvent Click(Me, New System.EventArgs())

> >--
> >Remember: There's no place like 127.0.0.1
> >==============================================
> >Happy To Help,
> >Tom Spink

> >http://dotnetx.betasafe.com >> VB, VB.NET, C#, C++ Code
> >Happy Coding!!

> >Please respond to the newsgroups, so all can benefit.

> >One day


> >> I create user control with 1 button in it. What
> statement
> >> or syntax to do this. When clicking at button,it will
> call
> >> or raise usercontrol's event click.

> >.



Tue, 06 Sep 2005 00:28:33 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Parent UserControl's Properties in a UserControl (placed on another UserControl)

2. First Click In UserControl DataGrid Does Not Fire An Event

3. Click event in UserControl

4. How ro monitor click events on a usercontrol

5. How do I get an event from a form called by a UserControl

6. Can't make button default in usercontrol

7. Form's validate does not fire usercontrol(inside textbox) validating event

8. UserControl won't fire Events

9. classes' events in UserControl

10. Usercontrol as row (usercontrol datagrid) !!

11. Accessing a Usercontrol within a Usercontrol

12. Drag from UserControl to another usercontrol

 

 
Powered by phpBB® Forum Software