473,725 Members | 2,322 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Detect Position in DateTimePicker

In the top portion of the DateTimePicker, where the value of the date is
displayed, how can I detect whether the month or day or year is currently
focused, or, if ShowCheckBox = True, whether the checkbox is focused?
Nov 21 '05 #1
3 6383
test selstart property against you format string

possibly work backwards cause monday is shorter than wednesday.
"Charlie" <cfarrier at charlesfarriers oftware.com> wrote in message
news:AB******** *************** ***********@mic rosoft.com...
In the top portion of the DateTimePicker, where the value of the date is
displayed, how can I detect whether the month or day or year is currently
focused, or, if ShowCheckBox = True, whether the checkbox is focused?

Nov 21 '05 #2
Actually, what I need to know is, in a DateTimePicker which has focus, and
has ShowCheckBox set to true, whether or not the CheckBox has focus. If it
does, the UP and DOWN arrow keys will be used as vertical tabs, sending
focus to the control immediately above or below the current DateTimePicker.
Otherwise, the UP and down arrows will be used for their normal function of
changing the portion of the date that has focus.

I have tried looping through the Controls property of the DateTimePicker,
but the internal controls do not belong to that collection.

Thanks for trying.


"Jared" wrote:
test selstart property against you format string

possibly work backwards cause monday is shorter than wednesday.
"Charlie" <cfarrier at charlesfarriers oftware.com> wrote in message
news:AB******** *************** ***********@mic rosoft.com...
In the top portion of the DateTimePicker, where the value of the date is
displayed, how can I detect whether the month or day or year is currently
focused, or, if ShowCheckBox = True, whether the checkbox is focused?


Nov 21 '05 #3
According to the MSDN help files, you can access the datetimepicker' s
control collection as follows:

Me.DateTimePick er.Controls.Ite m(index).Contai nsFocus()

You can use Me.DateTimePick er.Controls.Ite m(index).GetTyp e() to check it's
type.

Dave

"Charlie" <cfarrier at charlesfarriers oftware.com> wrote in message
news:FF******** *************** ***********@mic rosoft.com...
Actually, what I need to know is, in a DateTimePicker which has focus, and
has ShowCheckBox set to true, whether or not the CheckBox has focus. If
it
does, the UP and DOWN arrow keys will be used as vertical tabs, sending
focus to the control immediately above or below the current
DateTimePicker.
Otherwise, the UP and down arrows will be used for their normal function
of
changing the portion of the date that has focus.

I have tried looping through the Controls property of the DateTimePicker,
but the internal controls do not belong to that collection.

Thanks for trying.


"Jared" wrote:
test selstart property against you format string

possibly work backwards cause monday is shorter than wednesday.
"Charlie" <cfarrier at charlesfarriers oftware.com> wrote in message
news:AB******** *************** ***********@mic rosoft.com...
> In the top portion of the DateTimePicker, where the value of the date
> is
> displayed, how can I detect whether the month or day or year is
> currently
> focused, or, if ShowCheckBox = True, whether the checkbox is focused?
>
>


Nov 21 '05 #4

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

Similar topics

2
2853
by: snake_2k | last post by:
The button in the datetimepicker class that opens the calendar is too small for my touchscreen users. How can I make a regular button that opens the datetimepicker calendar ? I don't want to just make the font in the datetimepicker huge, that only makes the button very tall and skinny. Thank you for any ideas!
0
1421
by: Tom Rahav | last post by:
Hi. I have a DateTimePicker on a win form in VB.NET 2003, and I have a database table that contains different dates as records. What I want to do is detect what dates are exist in the database, and mark then on the DateTimePicker. Does anyone know how can I mark a specific date in the DateTimePicker (which is not the current date)? Thanks! Tom Rahav.
9
3972
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 will not set the value of the control and will leave the checked status of the checkbox to false when a user selects a new date. this works fine when using the control on a win2k machine but if we use it on a win XP box and call
1
1097
by: Parveen | last post by:
Hi, I am binding the controls on my form as follows: txtTextbox1.DataBindings.Add("Text", ds, "Table1.Field1") I have a function called AddRow() then adds a new to the table and tries to set the position of the binding context to the next new as follows: Public Sub AddRow()
1
1723
by: mfleet1973 | last post by:
Hi. I'm using vb.net 2003. I'm trying to find a way to detect when the calendar "pops up". For example, when the user clicks on the button to display the calendar, I need to know that this occurs. Which event do I use? Thaks a lot!!
4
1905
by: WazzaRoberts | last post by:
I currently have a datetimepicker on a form and a sepertae check box next to it. the dtp is not enabled. When the check box is ticked the dtp becomes enabled, now here lies my problem, when i click the check box to enable the dtp it does enable but it jumps from its position on the form upto the top left corner. If i then click the checkbox again the dtp returns to its original position and is disabled. Here is my code 'if checkbox ticked...
2
11682
by: Dave Anson | last post by:
I have created a custom datetimepicker (following on from a previous thread "DateTimePicker color"). How do I set the position of a Modal Dialog (a control containing a month calendar) relative to a control (containing a textbox and a button) on a windows form? I.e. I want the modal dialog to open just beneath the control that opened the dialog. -- Regards
0
1767
by: Andrus | last post by:
I placed DateTimePicker to Winforms DataGridView using sample code from MSDN. When dropdown calendar is not opened, up and down arrow keys must move to previous/next row in grid. So I modified EditingControlWantsInputKey() to add check for this using code below. This causes error
0
1324
by: AboutJAV | last post by:
Hi, I am using a DateTimePicker control to allow the user to select a new date. At first, I use an event Date_Changed Event as well as databinding the control to a property. When the user click on the control and the calender drops down, the new selected date will invoke either the databinding or event handler method, which trigger another method call. The problem:
0
9393
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9164
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9092
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8072
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6000
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4775
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3212
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 we have to send another system
2
2622
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2151
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.