I have a text box that is intended to maintain a date.
How do I get a small calendar object (like the ones in Outlook 2000) to appear when the focus is on this text box??
Printable View
I have a text box that is intended to maintain a date.
How do I get a small calendar object (like the ones in Outlook 2000) to appear when the focus is on this text box??
Hey
I am not sure if I understand what you want. But just put a calendar control on your form, set it's visible property
to false. Then in the text box GotFocus event put:
Calendar1.Visible = True
Then you could set it's Visible property to false in the text box LostFocus Event if you wanted to.
Is this what you wanted?
-William
As another alternative, you could use the Date-Time Picker control instead of a textbox. The DTPicker control has a drop-down arrow that will show a calendar when clicked.
Try this..it might not be exactly what you want but here goes.
This is assuming you have the text control on the form of course :
Private Sub Text1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Show
Text1.Text = Format(Now, "Long Date")
End Sub
This way when the user moves the focus over the text box the date/time will appear on it...
You can also change the "Long Date" to others like this
"Short Date"
"General Date"
"Medium Date"
Hope this helps. :)
There are 2 Calendar controls you can use: Microsoft Calendar Control and another one which is found in Microsoft Comman Controls 2
Thanks, folks
I got answers from basic to fancy.
Maybe one day I'll be able to answer a few questions myself