Solution validée par @Gherca,Marius
J'ai trouvé un moyen simple mais efficace, SendKeys("{ESC}").
Ce navigateur n’est plus pris en charge.
Effectuez une mise à niveau vers Microsoft Edge pour bénéficier des dernières fonctionnalités, des mises à jour de sécurité et du support technique.
How to close the dropdown from DateTimePicker without selecting any date? Visual studio, .NET, C#, WinForm. Within the code, I have to interact with the user, I'm in the DropDown event of the DateTimePicker, to my question he has to answer yes or no, if NO, I simply want the date selection menu to close. I tried another approach, with MouseDown on the DTP control but the DropDown is no longer executed, does anyone have another idea? I need the user in front of several DTPs to choose the DTP to modify, but if he chooses wrongly, to be able to switch to another one without making 1 additional click to select a date that does not needs. It's possible? THX.
Solution validée par @Gherca,Marius
J'ai trouvé un moyen simple mais efficace, SendKeys("{ESC}").
I found a simple but effective way, SendKeys("{ESC}").