473,396 Members | 2,004 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

About KeyEventArgs

the KeyEventArgs.KeyCode is readonly, so I want to override it.
How to do it?

I create a class,
public class ExteKeyEventArgs : KeyEventArgs
{
ExteKeyEventArgs(Keys keys)
}
but it has a error, the error said, the method KeyEventArgs has not over
ride(error CS1501).
What's wrong?

Thank you.
Nov 16 '05 #1
1 2691
Hi,

"KeyEventArgs" class look pretty inheritable for me.

Try this:

using System.Windows.Forms;

public class ExteKeyEventArgs
: KeyEventArgs
{
public ExteKeyEventArgs(Keys keys)
: base(keys)
{
}
}

HTH
Marcin
the KeyEventArgs.KeyCode is readonly, so I want to override it.
How to do it?

I create a class,
public class ExteKeyEventArgs : KeyEventArgs
{
ExteKeyEventArgs(Keys keys)
}
but it has a error, the error said, the method KeyEventArgs has not over
ride(error CS1501).
What's wrong?

Thank you.

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Edward Diener | last post by:
If I try to reference System::Windows::Forms::KeyEventArgs in a header file I get the error: MyHeader.h(236) : error C2039: 'Windows' : is not a member of 'System' Any ideas why this is...
4
by: Dino Buljubasic | last post by:
can somebody help me please with this simple problem? I have combo box with numbers for months in it and want user to be able to select a month Say 3 (for March) simply by clicking a number...
5
by: **Developer** | last post by:
How do I know if the value in a KeyEventArgs is printable? Basicacally, in KeyUp I'd like to know if the character is printable, as opposed to say, a backspace. I suppose I could check...
0
by: Rich | last post by:
Hello, I found this code on google for autocompleting text from a combobox. The works fine. It was the shortest sample of the samples I found. I added a few extra keys to ignore on keyup like...
2
by: Martijn Mulder | last post by:
How can I check the state of the modifier keys (Alt, Control, Shift) when there is no System.Windows.Forms.KeyEventArgs-object available (i.e. when not responding to a key-event)?
3
by: =?Utf-8?B?cGFucGF3ZWw=?= | last post by:
Is there a way to quickly determine if the key pressed was from 'A'-'Z' or '0'-'9' range? I really don't like to write switch with every Keys.A, Keys.B, etc key listed Paul
1
vinci
by: vinci | last post by:
Help Me!!!! T_T I want to create an instance of System.Windows.Forms.KeyEventArgs in vb.net for me to be able to use the .keyCode method of that class...is this possible??? basically, i want...
1
by: Claudia Fong | last post by:
I have the code below: private void OnKeyDownHandler(object sender, KeyEventArgs e) { if (e.Key == Key.Return) { TextBox2.Text = "You Entered: " + textBox1.Text; } }
4
by: Anthony P. | last post by:
Hello Everyone, I'm building an application and need to keep track of the amount of text in a textbox to make sure the user knows how many characters they have left to type. I've set the...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.