Results 1 to 6 of 6

Thread: Calendar controls???

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Location
    San Antonio, Texas, USA
    Posts
    4

    Question

    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??


  2. #2
    Member
    Join Date
    Apr 1999
    Location
    Reno, NV
    Posts
    57
    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

  3. #3
    PowerPoster BruceG's Avatar
    Join Date
    May 2000
    Location
    New Jersey (USA)
    Posts
    2,657
    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.
    "It's cold gin time again ..."

    Check out my website here.

  4. #4
    Addicted Member
    Join Date
    May 2000
    Posts
    240

    Talking This might help

    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.


  5. #5
    Guest
    There are 2 Calendar controls you can use: Microsoft Calendar Control and another one which is found in Microsoft Comman Controls 2

  6. #6

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Location
    San Antonio, Texas, USA
    Posts
    4

    Wink

    Thanks, folks

    I got answers from basic to fancy.

    Maybe one day I'll be able to answer a few questions myself


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width