Wrox Programmer Forums
|
.NET Framework 1.x For discussing versions 1.0 and 1.1 of the Microsoft .NET Framework.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Framework 1.x section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 7th, 2007, 01:55 AM
Authorized User
 
Join Date: Jan 2007
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default problem solved

I have a class MyDataGrid which is inherited from Datagrid
which have two protected override functions.
i want to register the events.
for example
public class MyDataGrid : DataGrid

    {
        protected override void OnMouseMove(System.Windows.Forms.MouseEventArgs e)
    {
//dosomething
}
protected override void OnMouseDown(System.Windows.Forms.MouseEventArgs e)
        {
//dosomething
}
Now i want to register these events
i m registering as
this.dataGrid1.MouseDown+=new System.Windows.Forms.MouseEventHandler(this.OnMous eDown);
this.dataGrid1.MouseMove+=new System.Windows.Forms.MouseEventHandler(this.OnMous eMove);

error is
Method 'System.Windows.Forms.Control.OnMouseDown(System.W indows.Forms.MouseEventArgs)' does not match delegate 'void System.Windows.Forms.MouseEventHandler(object, System.Windows.Forms.MouseEventArgs)'
Method 'System.Windows.Forms.Control.OnMouseMove(System.W indows.Forms.MouseEventArgs)' does not match delegate 'void System.Windows.Forms.MouseEventHandler(object, System.Windows.Forms.MouseEventArgs)'
can anybody tell me waht's the solution?
i m coding in C# Windows application ,version 1.1(2003)
 
Old March 7th, 2007, 12:20 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 596
Thanks: 1
Thanked 3 Times in 3 Posts
Default

Please only post in ONE forum

======================================
"They say, best men are molded out of faults,
And, for the most, become much more the better
For being a little bad."
--Shakespeare
======================================





Similar Threads
Thread Thread Starter Forum Replies Last Post
I myself solved my problem(now u all pls help me i rashmipant BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 0 October 12th, 2006 04:34 AM
Problem Solved. blackdevil1979 Beginning VB 6 0 March 22nd, 2005 09:55 PM
ACTIVEDATASHEET PROBLEM [SOLVED] BrianB Access VBA 1 January 26th, 2005 05:07 AM
ThePhileVB set up problem solved ..But eureka BOOK: ASP.NET Website Programming Problem-Design-Solution 2 August 26th, 2004 06:33 AM
Math problem solved in Java! freezotic BOOK: Beginning Java 2 7 January 21st, 2004 03:40 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.