By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,127 Members | 1,154 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,127 IT Pros & Developers. It's quick & easy.

Detect Position in DateTimePicker

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a
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.