VB.net Use code to open two DateTimePickers at the same time


I am using the following code to try to open two DateTimePicker control calendars but as expected
the first one closes when the second one is opened. Is there a way to open both calendars on both controls
at the sametime


Open in new window

Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

AndyAinscowFreelance programmer / ConsultantCommented:
I don't think there is.  To the best of my knowledge the calendar part is programmed to close as soon as soon as it loses the focus, which you do with the .Select() function call.
Fernando SotoRetiredCommented:
To your question, "Is there a way to open both calendars on both controls at the sametime", and adding to Andy's comment there can only be one control active an any one time and therefore in answer to this question no.
Mike TomlinsonHigh School Computer Science, Computer Applications, Digital Design, and Mathematics TeacherCommented:
If you need them both visible at the same time, use two MonthCalendar controls instead:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
OWASP: Forgery and Phishing

Learn the techniques to avoid forgery and phishing attacks and the types of attacks an application or network may face.

Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
Thank you all. I appreciate the  help
AndyAinscowFreelance programmer / ConsultantCommented:
re.  there can only be one control active an any one time...
Correct BUT just because a control loses focus doesn't automatically hide that control (in this case a popup window).  One can have multiple popup windows open simultaneously if they are so programmed.  Some controls, such as the calendar part of the date time picker, are coded to be disposed of when another control is selected.
Fernando SotoRetiredCommented:

That is correct but in some cases such as the standard DateTimePicker once the control loses focus it automatically returns to it default view unless one has extended the controls functionality.
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.