ive added the month calender tool to a form, I'm not sure if this is the right tool to use but what i want to be able to do is click a date on the calender and have another window popup with the correspnding date where text can be saved and check boxes can be selected/deselected. Also when the boxes or text field are modified i want a small indication on the month calender in the original form that data has been stored. I am quite new to programing and any help you can give me will be greatly appreciated. Thanx

Month calender Help!
manishvasani
It's probably not the best control for anything but the simplest needs but you could open your second form in the DateSelected event handler of the MonthControl and use AddBoldedDate to mark that date as having data saved under it.
Something like this:
private void monthCalendar1_DateSelected(object sender, System.Windows.Forms.DateRangeEventArgs e){
Form2 frm =
new Form2(e.Start); if(frm.ShowDialog() == DialogResult.OK){
monthCalendar1.AddBoldedDate(e.Start);
monthCalendar1.UpdateBoldedDates();
}
}
singam
I got the majority of what I wanted Ive now got a form labeled dateform to popup when i click a date and then when i click the ok button it adds the bolded date but what i problem I am now having is in dateform I have some check boxes how do I store the check box selections and then have them load up again when that date is clicked again also is possible I would like a button to reset the the checkboxes to blank and remove bolded date on calender. You have allready been of great help and I am learning more each day but any info you can give me is greatly appreciated.
Boatman
I can't seem to get that to work. you said it probally isn't the best control to use can you suggest something better all i want is a calender where i can open up a date and store info under that date and be able to view it again. As I said before I am very new to visual basic so as much explanation and code as I can get will be appreciated.
Thanx
Snortblt
My first example was in C#. Here is the same in VB.Net:
Private Sub MonthCalendar1_DateSelected(ByVal sender As Object, ByVal e As System.Windows.Forms.DateRangeEventArgs) Handles MonthCalendar1.DateSelected
Dim frm As New Form2(e.Start)
If frm.ShowDialog() = DialogResult.OK Then
MonthCalendar1.AddBoldedDate(e.Start)
MonthCalendar1.UpdateBoldedDates()
End If End SubThis Sub is an event handler for the MonthCalendar1 control in your main form. Form2 would be the form where you retrieve (if it already exists) edit and save your data for the selected date. How Form2 is implemented would depend on how you are storing your data, but you would at least need a button in Form2 with its DialogResult property set to OK for the above code to work. You could do your saving in the Click event handler for that button. Form2 would also need an additional New method (it creates one by default that you probably shouldn't touch) that takes a Date as a parameter, so that Form2 will know which date you have selected.
Geckex
Well, that topic can be pretty big in itself and is beyond my ability to cover here adequately, but I would look into ADO.Net, and Data Binding for retrieving and saving your data in an XML text file or database.