Ryan Chong
asked on
Date Time Picker uncheck problem
Hi,
I'm using a Data Time Picker control (System.Windows.Forms.Data TimePicker ) in my application.
I set it's ShowCheckBox Property to True. And set it Checked Property to False, and Set the default value to 01/01/1978
Then when i run the application, the Data Time Picker control is always Checked! When i back to the Form Design, the Checked Property stands as False. Why??! This simply confusing me.. Did i miss out something?
So, the question is:
How to set the Data Time Picker Control value and make it stays UnChecked?
In vb6 time, i can use DTPicker1.Value = Null but this is Not working in .net.
Any idea? thks
I'm using a Data Time Picker control (System.Windows.Forms.Data
I set it's ShowCheckBox Property to True. And set it Checked Property to False, and Set the default value to 01/01/1978
Then when i run the application, the Data Time Picker control is always Checked! When i back to the Form Design, the Checked Property stands as False. Why??! This simply confusing me.. Did i miss out something?
So, the question is:
How to set the Data Time Picker Control value and make it stays UnChecked?
In vb6 time, i can use DTPicker1.Value = Null but this is Not working in .net.
Any idea? thks
just a suggestion
try setting the showcheckbox property after the setting the default value
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
DateTimePicker1.Value = Now
DateTimePicker1.ShowCheckB ox = True
End Sub
try setting the showcheckbox property after the setting the default value
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
DateTimePicker1.Value = Now
DateTimePicker1.ShowCheckB
End Sub
this is a bug in win xp !!
I've had the same problem .. after slamming my head w/ wall a few times, i came across an article from MS website, which basically said this is a bug in win xp common controls. this was 3-4 months ago. i think they've fixed it by now. i can't find the article !
I've had the same problem .. after slamming my head w/ wall a few times, i came across an article from MS website, which basically said this is a bug in win xp common controls. this was 3-4 months ago. i think they've fixed it by now. i can't find the article !
ASKER
bramsquad
That's doesn't help, tried that before but didn't works..
RonaldBiemans
This is Not what i want, i also need to make sure the DTPicker's checkbox is UnChecked..
>>this is a bug in win xp !!
I'm using Win2k Adv Server, and my framework version is 1.0.3705, using M$ Development Environment 2002, version 7.0.9466.
It will be really helpful if you can provide me something here..
thks
That's doesn't help, tried that before but didn't works..
RonaldBiemans
This is Not what i want, i also need to make sure the DTPicker's checkbox is UnChecked..
>>this is a bug in win xp !!
I'm using Win2k Adv Server, and my framework version is 1.0.3705, using M$ Development Environment 2002, version 7.0.9466.
It will be really helpful if you can provide me something here..
thks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
i had the same problem,it's about datetime control.
It is inconsistent :)
so i write like this
dtp.checked=true
dtp.checked=false
funy but it's working :)
It is inconsistent :)
so i write like this
dtp.checked=true
dtp.checked=false
funy but it's working :)
ASKER
What a bug from M$! only their programmers know why come like that..
anyway, thks guys for the comments, i resolved my problem ;-) cheers
anyway, thks guys for the comments, i resolved my problem ;-) cheers
actually .. i had dome same (i.e. checked=true/false) .. but it'll still be inconsistent .. i can email you a screenshot as a proof that I had taken and email m$.
- malhar
- malhar
dtpicker1.checked = false