|
-
Jul 30th, 2003, 10:07 AM
#1
Thread Starter
Addicted Member
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
-
Jul 30th, 2003, 02:35 PM
#2
Lively Member
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
-
Jul 30th, 2003, 02:41 PM
#3
Thread Starter
Addicted Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|