473,503 Members | 6,385 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

key events in a winforms custom control class

1 New Member
I've been building my own nullable and bindable datetimepicker class, which inherits from DateTimePicker and includes a textbox to handle any user text entry, blanking the date for null, and such. Works great and handles all my needs just fine, except for one thing: key events when the calendar is dropped down. I wanted to capture the Enter key (which would set the control value to the dtp value; and the Escape key (which would leave the control value unchanged). I'm doing all the synchronization work between Mybase.Value and the control's value at the CloseUp event and figured it would be no sweat to intercept the key events and set some flags to whatever I wanted. But no go. I've tried 'em all, from PreviewKeyDown to ProcessCmdKey and everything in between, and I never get one before Closeup. I'm sure I'm missing something simple, but have no idea what.
Dec 12 '14 #1
0 1094

Sign in to post your reply or Sign up for a free account.

Similar topics

1
4857
by: Caronte | last post by:
Hi all, I have a problem using Custom control class inside a DLL Extension. My Custom control use Class property to specify the register class name for the control. Both Dialog Class and...
0
1619
by: keith | last post by:
I created a custom control class which inherted from another control class in C#. The another control referenced another assembly. I put the custom control into toolbox and drew it into a form...
3
10813
by: Joe Bloggs | last post by:
Does anyone know if its possible to pass parameters or the values of Request.QueryString from a web page to a custom control class? I'm using a C# Web Application. For Example I have Web Page1...
3
1685
by: TIBM | last post by:
Hi. I'm not getting any answers in buildingcontrols, so I'm gonna try here. I've written a custom control derived from System.Web.UI.WebControls.ListControl. The control is taking in a dataset and...
19
4890
by: Jamey Shuemaker | last post by:
I'm in the process of expanding my knowledge and use of Class Modules. I've perused MSDN and this and other sites, and I'm pretty comfortable with my understanding of Class Modules with the...
9
5091
by: Rob | last post by:
When a custom control is used within a form, that control does not get events directly. I've run into this a couple times with both mouse and keyboard events. Ex: A custom control inherits from...
15
6472
by: rizwanahmed24 | last post by:
Hello i have made a custom control. i have placed a panel on it. I want this panel to behave just like the normal panel. The problem i was having is that the panel on my custom control doesnt...
1
3000
by: --== Alain ==-- | last post by:
Hi, I still have problem updating my custom control at design time. When i change a property of my custom control in the property window, i would like to see this change immediately on my custom...
2
1301
by: PR | last post by:
Hello, I'm creating a Windows control that includes a few textboxes. In the form designer, I want there to be one property that drops down into a few sub-values for the different text boxes,...
1
5240
by: JTC^..^ | last post by:
When I create a custom control inside my Windows Application project it does not appear in the toolbox. I'm using Visual Studio 2005 (Team System for Developers), so this should appear...
0
7194
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
7267
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,...
1
6976
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
5566
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,...
1
4993
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3160
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3148
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1495
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
372
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.