Article
    C#
    ADO.Net
    .NET
    ASP.Net & Web Forms
    Custom Controls
    Web Development
    Exception Handling
    XML
    Database
    Security in .Net
    Testing
    Web Services
    Windows Services
    Windows Controls
    WCF
    AJAX
    WPF
    XAML
    Reporting
    Setup
    VB.Net
    LINQ
    JQuery
    SilverLight
    JavaScript
    HTML5
    Crystal Report
    Cloud Computing
    Share Point
    Visual C++
    MVC
    Android
    PHP
    Java
    HTML
    WordPress
    Joomla
    Products
    Drupal
    Windows Phone
    JSON
    LightSwitch
    iPhone/iPad
    Ruby on Rails
    IIS 7
    Windows 8
    CSS/CSS3
    Excel
    MS Access
    Shortcut Keys
    Visual SourceSafe
    Team Foundation Server
    API(s)
    Sencha-Touch
    Single Page App
    Bootstrap
Follow Us
Follow _MindStick_ on Twitter View MindStick Software's LinkedIn profile View MindStick Software's Facebook profile
Top Contributor
Advertisement
Advertise with Us
Mindstick
Article Article  Forum Forum  Blog Blog  Quiz Quiz  Beginner Beginner  Careers Careers  Contact Contact  Login Login  
Home | Product | Services | About Us | Interview | DeveloperSection | Submit an Article | Submit Blog

Home >> VB.Net >> MonthCalendar Control in VB.Net
MonthCalendar Control in VB.Net
MonthCalendar Control in VB.Net


by Pushpendra Singh on 12/12/2010 4:05:25 PM

Views: 7708       Comments: 0

MonthCalendar Control in VB.Net

The MonthCalendar control allows you to select date.

How to use MonthCalendar Control

Drag and drop MonthCalendar Control from toolbox on the window Form.

MonthCalendar Control in VB.Net

Code:

Public Class Form11

    Private Sub MonthCalendar1_DateChanged(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DateRangeEventArgs) Handles MonthCalendar1.DateChanged

        'selected date will display in Label

        Label2.Text = "Selected date is  " + MonthCalendar1.SelectionRange.Start

    End Sub

End Class

Run the project

MonthCalendar Control in VB.Net

When you select date then DateChanged event will fire and selected date will show on the Label.

MonthCalendar Control in VB.Net

Properties of MonthCalendar

FirstDayOfWeek: Default value is Sunday. It means week starts with Sunday as the first day and Saturday as last. You can set the first day of the week depending upon your choice by selecting from the predefined list with this property.

ShowToday: Default value is set to true which displays the current date at the bottom of the Calendar. When set it to False will hide current date.

Private Sub Form11_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        'Hide current date

        MonthCalendar1.ShowToday = False

 End Sub

MonthCalendar Control in VB.Net

ShowTodayCircle: Default value is set to true which displays a circle on the current date. Setting it to False will make the circle disappear.

ShowWeekNumber: Default is False. Setting it to True will display the week number of the current week in the 52 week year. That will be displayed towards the left side of the control.

 

Report Abuse Form
Reason:    
 

Title :
Comment :
Text ColorBackground Color
BoldItalicUnderline
LeftCenterRightJustify
Ordered ListBulleted List
IndentOutdent
Horizontal Rule
SubscriptSuperscript
HyperlinkImage
Design ModeDesign
View HtmlHtml
     
 
Latest Article by Pushpendra SinghRSS Feed
    
    
    
    
    
    
    
    
    
    
More...
Latest BlogsRSS Feed
    
    
    
    
    
    
    
    
    
    
More...
Top Viewed ArticlesRSS Feed
    
    
    
    
    
    
    
    
    
    
Top Viewed BlogsRSS Feed
    
    
    
    
    
    
    
    
    
    
Latest Interview QuestionsRSS Feed
    
    
    
    
    
    
    
    
    
    
More...
Total Online Users: 3756
Advertisement
MindStick Cleaner
Advertise with Us
  
Copyright © 2009 - 2014MindStick. All Rights Reserved.