Results 1 to 3 of 3

Thread: DateTimePicker format

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 2003
    Posts
    219

    Question DateTimePicker format

    Anyone know a way to prevent the DateTimePicker from having the right drop down arrow? I want to use the DateTimePicker as a Time and so I don't want to have the drop down as an option.

    Many thanks for the help!

    ljCharlie

  2. #2
    Lively Member
    Join Date
    Jun 2003
    Posts
    124
    heres a long way of doing it
    put this in your form load

    Dim intMonth As Integer
    Dim strMonth As String
    DateTimePicker1.Visible = False
    intMonth = DateTimePicker1.Value.Month
    Select Case intMonth
    Case 1
    strMonth = "January"
    Case 2
    strMonth = "February"
    Case 3
    strMonth = "March"
    Case 4
    strMonth = "April"
    Case 5
    strMonth = "May"
    Case 6
    strMonth = "June"
    Case 7
    strMonth = "July"
    Case 8
    strMonth = "August"
    Case 9
    strMonth = "September"
    Case 10
    strMonth = "October"
    Case 11
    strMonth = "November"
    Case 12
    strMonth = "December"


    End Select

    TextBox1.Text = DateTimePicker1.Value.DayOfWeek.ToString & ", " & strMonth & " " & DateTimePicker1.Value.Day & ", " & DateTimePicker1.Value.Year


    db

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Feb 2003
    Posts
    219

    Lightbulb

    Thanks for the help. Actually I figured it out. The easist way to change a drop down arrow from calendar to time is use datetimepicker.ShowUpDown = True

    ljCharlie

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