Link to home
Start Free TrialLog in
Avatar of Murray Brown
Murray BrownFlag for United Kingdom of Great Britain and Northern Ireland

asked on

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]
SOLUTION
Avatar of AndyAinscow
AndyAinscow
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Murray Brown

ASKER

Thank you all. I appreciate the  help
@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.
@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.
Thanks