Solved

How to Capture the Value of the Date Clicked on on a MonthCalender Control in a DateTime Variable By Clicking on Date

Posted on 2011-02-22
2
528 Views
Last Modified: 2013-11-26
I have a MonthCalendar Control ( named MonthCalendar1 ) on a Form1 in a Visual Basic Project in  Visual Studio 2008. I would like to capture the Value of the Date I click on this MonthCalender1 control in a DateTime  Variable  named  myDate.
I would appreciate help with code that would achieve this for me. Please also let me know in which event of this MonthCalendar Control I should put this code. Thank you for your help in anticipation.

0
Comment
Question by:FaheemAhmadGul
2 Comments
 
LVL 9

Accepted Solution

by:
Misbah earned 100 total points
ID: 34955795
Use DataChanged Event:
 

private void monthCalendar1_DateChanged(object sender, DateRangeEventArgs e)
{
     DateTime selectedDate = e.Start;
        
}

Open in new window

0
 

Author Closing Comment

by:FaheemAhmadGul
ID: 34955848
Many thanks. I am very grateful. Regards
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question