# SftDate/OCX 2.0 — Guide > SftDate/OCX is a set of two ActiveX controls for the Windows™ operating system: SftDate, a date field for a date, a time, a date and time or a range of dates, with a dropdown calendar and time selection, and SftCalendar, a month calendar showing one or more months. Both controls follow the culture and calendar system of your choice, for applications written using C#, VB.NET and C++. Index of the SftDate/OCX 2.0 guide, which is split into 7 files in reading order. Each entry links one file and lists its topics; read only the files you need. Online documentation: https://softelvdm.com/Documentation/SftDate%20OCX%202%200 API reference (index of the reference files): https://softelvdm.com/Vault/Softelvdm.com/llms/SftDate-OCX-2.0-reference.txt ## Introduction https://softelvdm.com/Vault/Softelvdm.com/llms/SftDate-OCX-2.0-guide-1.txt - SftDate/OCX - Date and Calendar Controls: SftDate/OCX is a set of two ActiveX controls for the Windows™ operating system: SftDate, a date field for a date, a time, a date and time or a range of dates, with a dropdown calendar and time selection, and SftCalendar, a month calendar … - Installing SftDate/OCX: SftDate/OCX 2.0 has the following system requirements: ## Features (1 of 3) https://softelvdm.com/Vault/Softelvdm.com/llms/SftDate-OCX-2.0-guide-2.txt - Field Components: A date field control (SftDate) shows one value: a date, a time, a date and time, or a range of dates. - Calendar Components: A month calendar control (SftCalendar) shows one or more months. - Values and Empty Fields: The Value property of a date field control (SftDate) holds its value, the Value property of a month calendar control (SftCalendar) its selected date. - Formats: The Format property defines how a field shows its value. - Cultures and Calendar Systems: The Culture property defines the culture of a control: its date and time patterns, the names of months and days, the AM/PM designators, the first day of the week, the week number rule and the century used for two-digit years. - Right-To-Left Reading Support: The date field control (SftDate) and the month calendar control (SftCalendar) support a right-to-left layout, for languages such as Arabic, Hebrew and Persian. - Editing: The EditStyle property defines how the user enters the value of a field: one part at a time (editSftDateSegments, the default) or by typing the whole value as text (editSftDateFreeForm). - Validation: Values the user enters in a field are checked in three steps: ## Features (2 of 3) https://softelvdm.com/Vault/Softelvdm.com/llms/SftDate-OCX-2.0-guide-3.txt - The Dropdown: The dropdown button of a date field control (SftDate), the F4 key and Alt+Down open the dropdown. - Time List and Clock: The dropdown of a field showing a time offers the time in one of two styles, defined by the TimeDropDownStyle property. - Date Ranges: With the SelectionMode property set to selectionSftDateRange, a field or a calendar (SelectionMode) holds a range of dates instead of one date. - Calendar Layout and Views: The MonthsAcross and MonthsDown properties of the SftDateCalendar object, returned by the Calendar property of a month calendar control and the Calendar property of a date field control, define how many months a calendar shows side by side … - Week Numbers: With ShowWeekNumbers set to True, a calendar shows the number of each week in front of it, in the WeekNumberForeColor and WeekNumberBackColor colors. - Today and Clear Buttons: Below its months, a calendar can show two buttons. - Special Dates: Special dates are days a calendar shows differently, such as holidays and appointments. - Day Formatting: The DayFormatting event occurs before a calendar shows a day, so the application can change how the day is shown and whether it can be selected. - Colors: All colors of the controls can be defined by the application: the colors of a field are properties of the SftDate control, the colors of a calendar are properties of the SftDateCalendar object returned by the Calendar property, for an … ## Features (3 of 3) https://softelvdm.com/Vault/Softelvdm.com/llms/SftDate-OCX-2.0-guide-4.txt - Hit Testing: The HitTest method returns what is at a location of a control, in pixels relative to the control's client area (HitTest, HitTest). - Keyboard Interface: The keys below work in any container, such as a Windows Forms form or a dialog, where the container moves the input focus with Tab and Shift+Tab and uses Enter and Escape for its default and Cancel buttons (in Windows Forms, the form's … - Using Themes: The SftDate and SftCalendar controls use Windows themes (visual styles) by default, so they match the standard Windows controls of the application. - Dark Mode: SftDate/OCX 2.0 supports dark mode. - High Contrast: Windows High Contrast (contrast themes) is an accessibility setting, not a visual preference. - Accessibility (Screen Readers): SftDate/OCX 2.0 ships with built-in Windows UI Automation (UIA) support. - Per-Monitor DPI and Scaling: SftDate/OCX 2.0 is Per-Monitor v2 DPI-aware. - Comparison with the DTPicker and MonthView Controls: The Microsoft Windows Common Controls-2 (MSCOMCT2.OCX) include the date and time picker (DTPicker) and the month calendar (MonthView) ActiveX controls, which many applications written using Visual Basic 6 and Office VBA use. ## Using SftDate/OCX (1 of 2) https://softelvdm.com/Vault/Softelvdm.com/llms/SftDate-OCX-2.0-guide-5.txt - Using SftDate/OCX: SftDate/OCX can be used with most development tools that support ActiveX controls. - Using SftDate/OCX with .NET: .NET Framework and .NET 10 Adding SftDate/OCX To The Toolbox Adding SftDate/OCX To A Project Adding The SftHelperComponent To A Project Preparing a Project Special Considerations - Renamed Members - Dates and Null Values - Indexed … - Adding Controls To The Visual Studio Toolbox: The controls are automatically added to the Visual Studio Toolbox during installation of SftDate/OCX and are located in the toolbox group "Softel vdm, Inc.". - Visual Studio 2026 Notes: The following notes describe behaviors you may encounter when using SftDate/OCX in the Visual Studio 2026 Windows Forms designer, particularly with .NET 10 (or later) projects. ## Using SftDate/OCX (2 of 2) https://softelvdm.com/Vault/Softelvdm.com/llms/SftDate-OCX-2.0-guide-6.txt - Using SftDate/OCX with Visual Studio (Unmanaged C/C++): This section describes how SftDate/OCX is typically used with unmanaged C/C++ and Visual Studio. - Using SftDate/OCX with Other Development Tools: SftDate/OCX is designed according to the latest ActiveX standards and can be used with a wide variety of development tools. - Syntax Conventions Used: The syntax shown in this documentation follows these guidelines. - Syntax Get/Put/PutRef: The syntax for properties shows up to three forms (Get, Put and PutRef) if available, the first to retrieve the property value, the second and third to set the property value. - .NET Event Types: The syntax for events may list an event argument typically called e, which uses a type specific to the event shown as EventArgumentType. - Property Dialogs: Depending on the development environment used, the steps necessary to modify the control properties vary. - Error Messages: The method used to handle errors depends on the development language/tool used. - Demo Application: During the installation of SftDate/OCX, an icon for the demo application "Demo" (SftDateOCXDemo.exe) is installed in the program group SftDate OCX 2.0. - Samples: SftDate/OCX 2.0 includes sample code for C#, VB.NET and C++/MFC. ## Samples, Distributing SftDate/OCX https://softelvdm.com/Vault/Softelvdm.com/llms/SftDate-OCX-2.0-guide-7.txt - DemoSample Sample (C#): This sample shows labeled date fields of every kind and a month calendar, with options that change their culture and calendar system, dark mode, high contrast, buttons, border, dropdown alignment, months, week numbers, first day of the … - EventViewer Sample (C#): This sample logs the events of two date fields and a month calendar. - DemoSample Sample (VB.NET): This sample shows labeled date fields of every kind and a month calendar, with options that change their culture and calendar system, dark mode, high contrast, buttons, border, dropdown alignment, months, week numbers, first day of the … - EventViewer Sample (VB.NET): This sample logs the events of two date fields and a month calendar. - DemoSample Sample (C++): This sample shows labeled date fields of every kind and a month calendar in an MFC dialog, with options that change their culture and calendar system, dark mode, high contrast, buttons, border, dropdown alignment, months, week numbers, … - EventViewer Sample (C++): This sample logs the events of two date fields and a month calendar in an MFC dialog. - Distributing SftDate/OCX: This section describes the preferred distribution method when shipping SftDate/OCX with your application. - Technical Support: New major versions and product maintenance are available with an active support subscription.