Thursday 31 January 2013

desktop application for displaying image with calender if date changes image and quotation will be changed

private void Form1_Load(object sender, EventArgs e)
        {
            FormBorderStyle = FormBorderStyle.None;
          
         
            DateTime date = DateTime.Now.Date;
            DateTime myAppointment = new DateTime(2013, 1, 31);
            if (date == myAppointment)
            {
                pictureBox1.ImageLocation = "E:/rams/mastergift/mastergift/Resources/index.jpeg";
               
                label1.Text = "Atma Namsthe";
            }
            else if (date.AddDays(-1) == myAppointment)
            {
                pictureBox1.ImageLocation = "E:/rams/mastergift/mastergift/Resources/princess_tower_story.jpg";
            
                label1.Text = "Atma Namsthe";
            }
        }