A Generic Calendar Application
by Rob Parsons - Eyecan Publishing
As we are now entering a new year I thought it would be appropriate to review the behaviour of dates in the VB development environment. This interest was prompted by discovering the Calendar component that is shipped with Delphi and realizing that such a component would be handy to have in my VB arsenal. As I got involved in the project I became more and more aware of the limitations of the Delphi solution. Changing the International Date Settings in the control panel were not reflected in the Calendar component as the component had been hardwired in English ! This was unsatisfactory for my needs. I wanted a Calendar "object" that would be generic in every respects that would be independent of the Operating System's date format settings. As one would expect the VB solution ended up being quite different from the Delphi solution.
Those of you who are interested in the Delphi solution may wish to inspect the source code for the Delphi Calendar component which can be found in the \Delphi\Source\Samples\Calendar.pas file or refer to Chapter 11 "Customizing a grid" of the Component Writer's guide.
The Calendar Application
Initializing the Calendar
Implementing the Calendar
A Date to Remember
Files Accompanying This Article