Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Calendar control

Calendar control

Scheduled Pinned Locked Moved C#
tutorialquestion
7 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    boiDev
    wrote on last edited by
    #1

    Hi All i have a calendar on one form and i have a schedule on another form. When a use clicks on a date on the calendar or dobule clicks it i want it to open the Schedule form. Does any one know how to do this ? Thanks in advance

    M 1 Reply Last reply
    0
    • B boiDev

      Hi All i have a calendar on one form and i have a schedule on another form. When a use clicks on a date on the calendar or dobule clicks it i want it to open the Schedule form. Does any one know how to do this ? Thanks in advance

      M Offline
      M Offline
      Michael Bookatz
      wrote on last edited by
      #2

      add an event handler to the double clikc on the date time form then in the event handler open the form and pass what ever parameters you want to

      B 2 Replies Last reply
      0
      • M Michael Bookatz

        add an event handler to the double clikc on the date time form then in the event handler open the form and pass what ever parameters you want to

        B Offline
        B Offline
        boiDev
        wrote on last edited by
        #3

        I have tried that but no luck. Thanks

        L 1 Reply Last reply
        0
        • B boiDev

          I have tried that but no luck. Thanks

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Can you post the code that you used? Did you get an exception when you tried it? If yes, please post the message here :)

          1 Reply Last reply
          0
          • M Michael Bookatz

            add an event handler to the double clikc on the date time form then in the event handler open the form and pass what ever parameters you want to

            B Offline
            B Offline
            boiDev
            wrote on last edited by
            #5

            I am trying to write the code but i don`t know what to write. Im very new at c#.

            M 1 Reply Last reply
            0
            • B boiDev

              I am trying to write the code but i don`t know what to write. Im very new at c#.

              M Offline
              M Offline
              Michael Bookatz
              wrote on last edited by
              #6

              this is the generated code in designer

              this.monthCalendar1.Location = new System.Drawing.Point(305, 91);
              this.monthCalendar1.Name = "monthCalendar1";
              this.monthCalendar1.TabIndex = 3;
              this.monthCalendar1.DateChanged += new System.Windows.Forms.DateRangeEventHandler(this.monthCalendar1_DateChanged);

              and this is the method that opens up the new form

              private void monthCalendar1_DateChanged(object sender, DateRangeEventArgs e)
              {
              new Form2().ShowDialog();
              }

              B 1 Reply Last reply
              0
              • M Michael Bookatz

                this is the generated code in designer

                this.monthCalendar1.Location = new System.Drawing.Point(305, 91);
                this.monthCalendar1.Name = "monthCalendar1";
                this.monthCalendar1.TabIndex = 3;
                this.monthCalendar1.DateChanged += new System.Windows.Forms.DateRangeEventHandler(this.monthCalendar1_DateChanged);

                and this is the method that opens up the new form

                private void monthCalendar1_DateChanged(object sender, DateRangeEventArgs e)
                {
                new Form2().ShowDialog();
                }

                B Offline
                B Offline
                boiDev
                wrote on last edited by
                #7

                Thank You Very Much

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups