Click here to Skip to main content
16,005,473 members
Home / Discussions / C#
   

C#

 
GeneralRe: Strange Pin
bouli7-Jan-05 8:54
bouli7-Jan-05 8:54 
GeneralRe: Strange Pin
Heath Stewart7-Jan-05 9:03
protectorHeath Stewart7-Jan-05 9:03 
GeneralRe: Strange Pin
bouli7-Jan-05 9:10
bouli7-Jan-05 9:10 
GeneralStrange Pin
bouli7-Jan-05 6:30
bouli7-Jan-05 6:30 
GeneralRe: Strange Pin
Heath Stewart7-Jan-05 6:44
protectorHeath Stewart7-Jan-05 6:44 
GeneralRe: Strange Pin
bouli7-Jan-05 6:47
bouli7-Jan-05 6:47 
Generaldate time control Pin
Anonymous7-Jan-05 5:35
Anonymous7-Jan-05 5:35 
GeneralRe: date time control Pin
Heath Stewart7-Jan-05 6:42
protectorHeath Stewart7-Jan-05 6:42 
What exactly are you trying to do? If you're just trying to display a date and not let them pick a date, then just format a DateTime to the stirng format you want:
label1.Text = DateTime.Now.ToString("m");
For more information about the format codes allowed for DateTime.ToString read about it in the .NET Framework SDK, which is installed by default with VS.NET and is available online at http://msdn.microsoft.com/library[^].

If you disable the calendar, how is the user to pick a date? Yes, they can use the arrow buttons but many people don't know about that and it is cumbersome to use.

Do you only want to disable the year selection of the calendar? While not impossible it's not supported by the calendar control (which is actually the native Month Calendar control from Windows Common Controls) and you would have to go to quite a bit of work to clip it or hide that portion of owner-drawn content and to not allow notification messages to be sent when actions occur over those coordinates (like a mouse click).

If you want to allow the user to only see the month and day, then use a custom format by setting the DateTimePicker.CustomFormat property and in the code that uses the DateTime ignore the year.

Other than that you'll need to develop your own control.

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles] [My Blog]
GeneralRe: date time control Pin
Anonymous7-Jan-05 7:18
Anonymous7-Jan-05 7:18 
GeneralRe: date time control Pin
Heath Stewart7-Jan-05 7:33
protectorHeath Stewart7-Jan-05 7:33 
GeneralUdp. How to recieve. Pin
Umair Ahmad khan7-Jan-05 5:05
Umair Ahmad khan7-Jan-05 5:05 
GeneralRe: Udp. How to recieve. Pin
Heath Stewart7-Jan-05 6:34
protectorHeath Stewart7-Jan-05 6:34 
GeneralDoubts in Arabic Part of Work Pin
ChandruIT7-Jan-05 4:34
ChandruIT7-Jan-05 4:34 
GeneralRe: Doubts in Arabic Part of Work Pin
Nick Parker7-Jan-05 5:26
protectorNick Parker7-Jan-05 5:26 
GeneralRe: Doubts in Arabic Part of Work Pin
Member 967-Jan-05 8:51
Member 967-Jan-05 8:51 
GeneralVS 2005's application/client settings Pin
Marlun7-Jan-05 3:24
Marlun7-Jan-05 3:24 
GeneralRe: VS 2005's application/client settings Pin
Heath Stewart7-Jan-05 6:31
protectorHeath Stewart7-Jan-05 6:31 
GeneralRe: VS 2005's application/client settings Pin
Marlun7-Jan-05 7:49
Marlun7-Jan-05 7:49 
GeneralRe: VS 2005's application/client settings Pin
Heath Stewart10-Jan-05 6:04
protectorHeath Stewart10-Jan-05 6:04 
GeneralRe: VS 2005's application/client settings Pin
Marlun10-Jan-05 7:31
Marlun10-Jan-05 7:31 
GeneralRe: Insert a line into the begining of the text file Pin
Anonymous7-Jan-05 1:33
Anonymous7-Jan-05 1:33 
GeneralRe: Insert a line into the begining of the text file Pin
Stefan Troschuetz7-Jan-05 1:45
Stefan Troschuetz7-Jan-05 1:45 
GeneralRe: Insert a line into the begining of the text file Pin
itssuk9-Jan-05 18:26
itssuk9-Jan-05 18:26 
GeneralRe: Insert a line into the begining of the text file Pin
Stefan Troschuetz9-Jan-05 21:41
Stefan Troschuetz9-Jan-05 21:41 
GeneralRe: Insert a line into the begining of the text file Pin
J4amieC7-Jan-05 2:18
J4amieC7-Jan-05 2:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.