Solved

i close monthcalender control when i chose to navigate the month

Posted on 2014-04-15
2
291 Views
Last Modified: 2014-04-25
I have this code, but when I choose to navigate the month it set the .SelectionRange.Start to the date of that new month and therefore closes. I want it stay until I have finished the navigation through the months. I am think of comparing current month with new month before I close. Is there a better and direct way.

Thank you


Private Sub MonthCalendar1_DateChanged(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DateRangeEventArgs) Handles MonthCalendar1.DateChanged
        If (MonthCalendar1.SelectionRange.Start & "").Trim.Length > 0 Then
            adate.Text = MonthCalendar1.SelectionRange.Start
            MonthCalendar1.Visible = False
        Else
            adate.Text = ""
        End If
    End Sub
0
Comment
Question by:Anthony Matovu
2 Comments
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 500 total points
ID: 40006312
>I am think of comparing current month with new month before I close.

That sounds reasonable to me.

What is the purpose of this code in DateChanged event.
0
 
LVL 1

Author Comment

by:Anthony Matovu
ID: 40006653
When I position the cursor in a textbox that is supposed to received the calendar value, the monthcalender control is visible. I select the date and it should close.  It fails to give a chance to navigate the months before I chose the date.

thank you

Anthony
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

856 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