Custom DateTimePicker Control
Hello there!
I would like to develop a customized datetimepicker. I have a button and a datetimepicker. What I would like to happen is this: When I click on the button, it would trigger the action that drops down the calendar on the datetimepicker that I have. and if possible, display it on a location near or with respect to my button coz my datetimepicker is invisible.... any ideas and help would be much appreciated.
Thanks! :o
Re: Custom DateTimePicker Control
Cocoy,
So you are looking for a calender menu from which you can choose the date and possibly put that selected date in your invisible text box? If that is right then let me know because I have a code that can be useful for this. it is in vb.net
vikram
Re: Custom DateTimePicker Control
Just place a dtp on your form set visibility to false and show it upon the button click or have the button
completely covering the dtp. The place your button over the dtp. When you click the button you raise the
dtp dropdown event and it wll dropdown. Or send the message to dropdown
the dtp upon button click.
If you position the dtp so the botton/left of it is at the bottom/left of your
button it will appear the your
button is dropping a calendar.
HTH
Re: Custom DateTimePicker Control
Hey thats a good solution, although i have not used it in my dtp. But never the less i know a better way now ;)
;)
Re: Custom DateTimePicker Control
I did a similar thing with the dtp in vb6 so thats how I remembered. ;) :thumb:
Although for ease of use, you could create a usercontrol that inherited the dtp and command button. Then do
your code in there. Then you will have a scallable user control that will be easier to replicate on other
forms/projects.