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
527 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

863 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now