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

Hi

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

          Me.DateTimePicker1.Select()
            SendKeys.Send("%{DOWN}")
            Me.DateTimePicker2.Select()
            SendKeys.Send("%{DOWN}")[code]

Open in new window

[/code]
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
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.
0
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.
0
Mike TomlinsonHigh School Computer Science, Computer Applications, and Mathematics TeachersCommented:
If you need them both visible at the same time, use two MonthCalendar controls instead:
https://msdn.microsoft.com/en-us/library/0xah4ckt(v=vs.110).aspx
0

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
0
AndyAinscowFreelance programmer / ConsultantCommented:
@Fernando
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.
0
Fernando SotoRetiredCommented:
@Andy

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.
0
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
Thanks
0
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.