MonthCalendar Control

Many applications must perform date and time calculations. The .NET Framework provides two controls that allow an application to retrieve date and time informationthe MonthCalendar and DateTimePicker (Section 14.4) controls.

The MonthCalendar (Fig. 14.8) control displays a monthly calendar on the Form. The user can select a date from the currently displayed month, or can use the provided links to navigate to another month. When a date is selected, it is highlighted. Multiple dates can be selected by clicking dates on the calendar while holding down the Shift key. The default event for this control is DateChanged, which is generated when a new date is selected. Properties are provided that allow you to modify the appearance of the calendar, how many dates can be selected at once, and the minimum and maximum dates that may be selected. MonthCalendar properties and a common event are summarized in Fig. 14.9.

Figure 14.8. MonthCalendar control.

(This item is displayed on page 660 in the print version)

Figure 14.9. MonthCalendar properties and an event.

(This item is displayed on page 660 in the print version)

MonthCalendar properties and an event

Description

MonthCalendar Properties

FirstDayOfWeek

Sets which day of the week is the first displayed for each week in the calendar.

MaxDate

The last date that can be selected.

MaxSelectionCount

The maximum number of dates that can be selected at once.

MinDate

The first date that can be selected.

MonthlyBoldedDates

An array of dates that will displayed in bold in the calendar.

SelectionEnd

The last of the dates selected by the user.

SelectionRange

The dates selected by the user.

SelectionStart

The first of the dates selected by the user.

Common MonthCalendar Event

DateChanged

Generated when a date is selected in the calendar.


Preface

Index

    Introduction to Computers, the Internet and Visual C#

    Introduction to the Visual C# 2005 Express Edition IDE

    Introduction to C# Applications

    Introduction to Classes and Objects

    Control Statements: Part 1

    Control Statements: Part 2

    Methods: A Deeper Look

    Arrays

    Classes and Objects: A Deeper Look

    Object-Oriented Programming: Inheritance

    Polymorphism, Interfaces & Operator Overloading

    Exception Handling

    Graphical User Interface Concepts: Part 1

    Graphical User Interface Concepts: Part 2

    Multithreading

    Strings, Characters and Regular Expressions

    Graphics and Multimedia

    Files and Streams

    Extensible Markup Language (XML)

    Database, SQL and ADO.NET

    ASP.NET 2.0, Web Forms and Web Controls

    Web Services

    Networking: Streams-Based Sockets and Datagrams

    Searching and Sorting

    Data Structures

    Generics

    Collections

    Appendix A. Operator Precedence Chart

    Appendix B. Number Systems

    Appendix C. Using the Visual Studio 2005 Debugger

    Appendix D. ASCII Character Set

    Appendix E. Unicode®

    Appendix F. Introduction to XHTML: Part 1

    Appendix G. Introduction to XHTML: Part 2

    Appendix H. HTML/XHTML Special Characters

    Appendix I. HTML/XHTML Colors

    Appendix J. ATM Case Study Code

    Appendix K. UML 2: Additional Diagram Types

    Appendix L. Simple Types

    Index



    Visual C# How to Program
    Visual C# 2005 How to Program (2nd Edition)
    ISBN: 0131525239
    EAN: 2147483647
    Year: 2004
    Pages: 600

    Flylib.com © 2008-2020.
    If you may any questions please contact us: flylib@qtcs.net