473,321 Members | 1,708 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,321 software developers and data experts.

Event for Check box in DateTimePicker Control

akashazad
I have put the DateTimePicker control on my Form and I have made it's CheckBox property to ture ,

Now I need to know is there any Event which is fired when the Check status of the checkbox in DateTimePicker is Changed.

PL help guys

Thankx in advance
Aug 24 '09 #1
4 12700
tlhintoq
3,525 Expert 2GB
A) Look at the MSDN for the control. It lists them all.
http://msdn.microsoft.com/en-us/libr...er_events.aspx

B) Put the control on a form and check the events pane of the Properties tab. You get to that by clicking the yellow lightning bold on the Properties tab. Here you can see all the events and assign handlers to them.

B.2) Once you have your DTP control on a form you can access it in code. Intellisense is very helpful here. Inside a method type the control's name followed by a period.
DateTimePicker1. {Menu pops up}
The intellisense context menu will appear with all of the control's methods and events. From there you can either scroll through the list, or start typing what you think you are looking for like "CheckChanged"
DateTimePicker1.Check {Menu jumps to the area of available choices}
Aug 24 '09 #2
Dear tlhintoq
Thanx for the reply,but the process you have told is known to me and I have gone through all the events provided in that drop down but could not found any relevant event so if you can please tell me the exact name of the event to use .
Aug 25 '09 #3
tlhintoq
3,525 Expert 2GB
ow I need to know is there any Event which is fired when the Check status of the checkbox in DateTimePicker is Changed?
but the process you have told is known to me
I hope I didn't offend you with the explanation of basic things. Many of the new people to Visual Basic don't yet know some of these and it helps them to learn how to look up information instead of relying on others.

I have gone through all the events provided in that drop down but could not found any relevant event
Then you have learned for yourself that while the DTP has a checkbox, and has an "IsChecked" property it has no "CheckChanged" event.

You could create your own control by inheriting from the DTP and adding a timer to check the IsChecked property and raise an event when it changes.

Personally I see it as a big oversight on the part of MS. This same problem exists in a couple other controls that have a checkbox but don't have an event for it.

Alternatively you could just put a checkbox control next to your DTP and use that.
Aug 25 '09 #4
Dear tlhintoq
Thankx for the reply...
Alternative solution you told seems great and will work for me thanx once again..
Aug 26 '09 #5

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

Similar topics

0
by: Pierre | last post by:
Hi, I am building a user control and I am trying to simulate the behavior of the DateTimePicker control. With DateTimePicker, when you click on it the day or month or year is selected depending on...
9
by: Guy | last post by:
I have extended the datetimepicker control to incorporate a ReadOnly property. I have used the new keyword to implement my own version of the value property, so that if readonly == true then it...
2
by: RSB | last post by:
Hi Everyone, How to add a DateTimePicker Control in a page.. I am trying to use using System.Windows.Forms.DateTimePicker But that is giving me an error..
4
by: toufik | last post by:
Hi, In the ValueChanged event of a dateTimePicker control I've a condition, and I like to reset the initial value if teh condition is false Private Sub dateDebut_ValueChanged(ByVal sender As...
5
by: DC | last post by:
Hi All, Is there any way to find out which portion of a datetimepicker control in a windows form has been selected? Thanks. DC
5
by: Alpha | last post by:
I have a DateTimePicker control that originally displays "1/1/1900" on screen. I want to change it to current date when a user clicks on it. I use the follow code but nothing is happening. Can...
0
by: Kumar R | last post by:
How to disable the specific date in the DateTimePicker control. suppose i want to disable all sundays and saturdays of the particular month. how to do? i search in the many sites, but i didn't find...
0
by: thull | last post by:
I'm trying to modify an older VB6 program and use the DateTimePicker control to give the user the ability to display and modify the system date and time. The VB6 documentation says it is available...
2
by: Todd Carnes | last post by:
I am trying to write an app in C# that requires the user to enter a date from 4000 B.C.E to 4000 C.E. I tried to use the DateTimePicker Control to allow the user to enter the date, but it only...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.