locked
Month Calendar Control issues.... RRS feed

  • Question

  • Hi,

    I am trying to make an application that uses the MonthCalender. I want the user to be able to click a date on the month calender and a new window (one that I have already made) pops up. I want the user to be able to interact with that window also. Then depending on a few conditions that I program into the application the date (on the Month Calender) will turn a different color.

    For example, if the user clicks the "25th" a new window will appear, the user fills out that window, and depending how they fill it out the date on the calendar will turn either green or red.

    I don't wan't anyone to write the code for me, just please point me in the right direction. Maybe tell me how to get another window to appear when the user clicks a date on the calendar. Thanks in advance!

    -Grant
    Wednesday, June 11, 2008 9:54 PM

Answers


  • Assume you have your other form out there written named postDatePopUp:

    You need to have a handler on the data changed of your calender and run this when that happens.

    1private postDatePopUp frm1  = new postDatePopUp(); 
    2private DialogResult datePopUpResult; 
    3//Assume this returns a dialogresult based on if what we wanted happened
    4datePopUpResult = frm1.ShowDialog() 
    5if(whatyouwantedhappened = datePopUpResult) 
    6
    7  changeyourdaytoacolor(); 
    8
    9else 
    10
    11  changeyourdaytoadifferentcolor(); 
    12


    I am sort of guessing what you want.  So i could be going the wrong way.

    • Edited by CarterCoder Wednesday, June 11, 2008 11:38 PM I copied my comment from the end but apparently missed some.
    • Proposed as answer by Somnath Paul Thursday, June 12, 2008 2:03 PM
    • Marked as answer by jack 321 Monday, June 16, 2008 2:51 AM
    Wednesday, June 11, 2008 11:35 PM

All replies


  • Assume you have your other form out there written named postDatePopUp:

    You need to have a handler on the data changed of your calender and run this when that happens.

    1private postDatePopUp frm1  = new postDatePopUp(); 
    2private DialogResult datePopUpResult; 
    3//Assume this returns a dialogresult based on if what we wanted happened
    4datePopUpResult = frm1.ShowDialog() 
    5if(whatyouwantedhappened = datePopUpResult) 
    6
    7  changeyourdaytoacolor(); 
    8
    9else 
    10
    11  changeyourdaytoadifferentcolor(); 
    12


    I am sort of guessing what you want.  So i could be going the wrong way.

    • Edited by CarterCoder Wednesday, June 11, 2008 11:38 PM I copied my comment from the end but apparently missed some.
    • Proposed as answer by Somnath Paul Thursday, June 12, 2008 2:03 PM
    • Marked as answer by jack 321 Monday, June 16, 2008 2:51 AM
    Wednesday, June 11, 2008 11:35 PM
  • Thank you! It isn't what I am thinking, but I got a few ideas from it. Thanks!
    Thursday, June 12, 2008 1:46 PM