468,308 Members | 1,293 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,308 developers. It's quick & easy.

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 5804
test selstart property against you format string

possibly work backwards cause monday is shorter than wednesday.
"Charlie" <cfarrier at charlesfarriersoftware.com> wrote in message
news:AB**********************************@microsof t.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 charlesfarriersoftware.com> wrote in message
news:AB**********************************@microsof t.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.DateTimePicker.Controls.Item(index).ContainsFoc us()

You can use Me.DateTimePicker.Controls.Item(index).GetType() to check it's
type.

Dave

"Charlie" <cfarrier at charlesfarriersoftware.com> wrote in message
news:FF**********************************@microsof t.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 charlesfarriersoftware.com> wrote in message
news:AB**********************************@microsof t.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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Tom Rahav | last post: by
1 post views Thread by Parveen | last post: by
1 post views Thread by mfleet1973 | last post: by
2 posts views Thread by Dave Anson | last post: by
reply views Thread by Teichintx | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.