This sample is located in \Samples\ActiveX\Invoke.
Description
Using the Sample
Key Project Files
Technologies Demonstrated
This sample is a jview application that hosts the Microsoft® ActiveX® Calendar control provided in Microsoft® Office. When run, the sample displays a calendar with a selectable month and year. The calendar also contains buttons that allow you to set a specific date and retrieve the currently selected date.
This sample uses the com.ms.activeX.ActiveXControl class to host the Calendar control. When creating the control, the CLSID is passed to the ActiveXControl constructor, which allows you to invoke methods and to retrieve or set properties of the control.
You must have Microsoft® Office 95 or later installed (including the Microsoft® Access Calendar control) to use this sample.
To compile the sample
Use Nmake.exe to compile the Makefile in the \Samples\ActiveX\Invoke directory.
To run the sample
Use the following command to run the sample:
jview Example.class
To use the sample
You can perform the following actions with the sample calendar:
This class creates the Example object, adds the calendar control to it, and adds buttons to control the application. The code also contains methods that set and get the value of the control's Day property when a button is pressed.
This sample shows how to: