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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
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 synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

747 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

13 Experts available now in Live!

Get 1:1 Help Now