Click here to Skip to main content
15,918,109 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am developing an windows application in vb.net(vs 2008),in that i took a datetimepicker which set to show only month & year.
When i select the month in datetimepicker then it will show the total no of days in textbox

Eg.
If i select Oct-2011 in datetimepicker then in textbox it will show the total no of days
Datetimepicker- Oct-2011
textbox- 31
i want this code in vb.net





Thanx in advance
Posted

1 solution

Handle the DateTimePicker.ValueChanged Event.
Read the Value property, and use a Select Case to decipher the Month into trhe appropriate number of days. Remember to check the year for yeap years, and adjust accordingly.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900