PC Review


Reply
Thread Tools Rate Thread

Adding events to usew windows controls

 
 
Vicky
Guest
Posts: n/a
 
      26th Oct 2008
I created a windows control. I need to define the event for a button
in it at the time i use it in apllications. I used the code below:


public event MouseEventHandler OkClick
{
add
{
button1.Click += value;
}
remove
{
button1.Click -= (MouseEventHandler)value;
}
}

But it is giving error that 'EverHadler' type cannot be implicitly
converted to 'MouseEventHandler'. Can someone tell me how to do it?
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding events to usew windows controls Vicky Microsoft C# .NET 1 26th Oct 2008 11:43 AM
dynamically adding controls with events (but events are not firing) SevDer Microsoft ASP .NET 2 13th Nov 2007 06:33 AM
Need help with order of page events and adding dynamic button controls. seanmayhew@gmail.com Microsoft ASP .NET 1 10th Apr 2005 07:29 PM
Adding events to dynamically created controls JezB Microsoft ASP .NET 2 18th Jun 2004 03:54 PM
Adding events to controls from vba Jan DOUMEN Microsoft Access Form Coding 0 27th Aug 2003 09:08 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:59 AM.