locked
How to reduce the size of calendar control at run time

    Question

  • Hi,

    I created simple exe file that contains month calendar control using framework 3.5 in XP machine and run this exe in vista the
    month calendar control not fully display, i write the following code to check for OS

    1. if (_operatingSystemName.ToLower().Contains("microsoft® windows vista™") == true)
    2. {
    3. this.Size = new Size(this.VaravuCalendar.Size.Width + 53, this.VaravuCalendar.Size.Height + 11);
      }

    What can i do to display the calendar fully and the form is not fully display.. pls any one can help me. i am in deadline. is any other way to fis the issue pls share

    Thanks

    • Changed type rkhema Wednesday, December 09, 2009 1:32 PM wrongly typed
    • Changed type rkhema Wednesday, December 09, 2009 1:48 PM
    Wednesday, December 09, 2009 1:31 PM

Answers

  • Hi,

    As I learnt from you post , you are chaning the form size instead of the calender size, please try the code bellow:


    this.VaravuCalendar.Size = new Size(this.VaravuCalendar.Size.Width + 53, this.VaravuCalendar.Size.Height + 11);

    Harry

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Proposed as answer by Narayanan Dayalan Friday, December 11, 2009 7:03 AM
    • Marked as answer by Harry Zhu Tuesday, December 15, 2009 7:01 AM
    Friday, December 11, 2009 6:54 AM