Results 1 to 7 of 7

Thread: BackColor Change of DatePicker

  1. #1
    Guest

    Talking

    How to change the BackColor of DatePicker Control?

    Note:Change the Color of the Text Portion of the DatePicker
    (Not the DropDown calendar portion)

  2. #2
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238
    rajkumar, don't know which one you looking at... hope your result is in there.
    Code:
    With DTPicker1
        .CalendarBackColor = vbRed
        .CalendarTitleBackColor = vbRed
        .CalendarForeColor = vbWhite
        .CalendarTitleForeColor = vbWhite
        .CalendarTrailingForeColor = vbBlue
    End With
    Chris

  3. #3
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    Hmm.. never used that control, what is it called? (in the components list)

    Thanks.
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  4. #4
    Guest

    Cool DatePicker

    Hai Jop,
    Select from the components option.
    Microsoft Windows Common Controls-2 6.0.

    --rajkumar


  5. #5
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345

    Well ...

    I don't know of any simple way of changing the BackColor of the textbox part of this control. If colour schemes are important to you, use a textbox in synchronization with the calender control.



    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

  6. #6
    Guest

    Cool DatePicker

    Hai Chris,

    My Q is different. The Code u have given will change the BackColor of Calander(drop down).

    I want to change the color of Text Portion.(i.e The Area which displays the date after the selection from the
    Drop down Calander)

    --rajkumar

  7. #7
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    Unfortuanatly I don't think this is possible, it doesn't seem to act like a textbox because it doesn't seem to accept the EM_SETBKGNDCOLOR (WM_USER + 67) message to change the backgroundcolor.

    PS: Thanks rajkumar for showing where to find it
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

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