CALENDAR.VCX
*
*   Author:       Gene Steinbacher
*                 (c) United Consulting, Inc.,  1995
*  Contact:       (913) 441-8514
*                 (816) 221-9300
*                 73214,1547              Compuserve
*
* Modifications: 
*  GeneS 11/16/95: Fixed bug - Was not displaying the month of December.
************************************************************************
Introduction:
	CALENDAR.VCX is a group of classes which gives you different types of calendar processing.  It includes a calendar class which you can put on any form, a calendar specifically designed to display at any time, a calendar specifically designed to display for a particular field, and a combination textbox/calendar popup class.


______________________________________________________________________________

CalFoxpro:              
	This is a calendar which can be displayed at any time. You can create multiple instances of it.  Since you can create an instance of it, you can reference it within a program, and you can read and modify its' properties.  It is not modal so the user can display the calculator and leave it running while doing other processing.

	You can even release the variable used to create the object and the calendar will remain available.  It does this using a simple but handy technique.  The CalFoxpro has a property (r_oSelf) which is set to its own object reference in the "Init" Method ("This.r_oSelf = This").  Since you cannot release the property, the form remains displayed until the user closes it.
		Eg.  SET CLASSLIB TO <cal_classlib>
			 loCal = CREATEOBJECT("CalFoxpro")
			 loCal.show
			 RELEASE loCal                          && The calendar is still displayed
				 
		NOTE: It CAN Be released with the statement: "loCal.release".
				 
______________________________________________________________________________


CalPopup:               
	This class is very similar to the CalFoxpro calendar.  The main differences are that you can pass parameters when you call it and you can return a value back to the calling program.  It is also MODAL so the user must finish using it before moving to another process.  This class is good for doing calculations that need to be stored in a specific value.
	
	Parameters
		1)      Value to be initially displayed in the calendar.
		2)      Position of the top of the calendar (default is centered).
		3)      Position of the left side of the calendar (default is centered).
		
	Properties:
		dReturnDate: The property which holds the value for the calling program.
					 If ESC is pressed, this value is set to .NULL.
			
	Eg.     LOCAL loCalendar
			SET CLASSLIB TO <cal_classlib>
			loCalendar = CREATEOBJECT("CalPopup", This.value)
			loCalendar.show
			IF NOT EMPTY(loCalendar.dReturnDate)
				This.value = loCalendar.dReturnDate
			ENDIF
			RELEASE CLASSLIB <cal_classlib>
______________________________________________________________________________

		
CalControl:
	This class is the actual calendar used in CalFoxpro and CalPopup.  It must be placed on another object before an instance of it can be created.  But it is a completely self contained calendar.  In other words, you can place this calendar on any form and it will work.  It is a control (not a container) so you cannot change properties or methods of any objects within CalControl (you can change the properties and methods of the CalControl control itself).

	Methods:
		m_refresh:      Changes the calendar to the date passed as parameter one.
					Eg. Thisform.ctrCal.m_refresh({08/25/65}) changes the 
						date on the calendar to August, 25, 1965.
					    
		m_date: Returns the calendar date in {mm/dd/yy} format.
		
		m_user: This method is called everytime the date is changed on the
				calendar.  You can put whatever code you would like in it.  See demo or "CalFoxpro" for an example of how this method might be used.

_____________________________________________________________________________

CalCombo:
	This class is a date entry/popup calendar combination.  One nice feature worth mentioning is that the command button is not visible unless the cursor is in the TextBox control.  This makes the form look much nicer to the user when there are several of these classes on the form.

______________________________________________________________________________
______________________________________________________________________________

DEMO:
	To run the demo simply type DO DEMO.  A form is displayed which has examples of all four        classes on it.

______________________________________________________________________________


Comments by Gene:

- The project file is there to give you easy access to the source code.  You do not need it to run the demo.

- Any comments or suggestions would be appreciated.  
  Complaints and worthless rhetoric will be read; but probably not appreciated.

- I love this object oriented stuff.

- I am not going to put all the legal mumbo-jumbo about "all rights reserved" and "not responsible" in this document.  I would think by now that everyone is aware of this fact about freeware.  "All Rights" are reserved, and "I AM NOT RESPONSIBLE" for anything that happens because you chose, WITH YOUR OWN FREE WILL, to use this software.

	Gene Steinbacher
	United Consulting, Inc.
	911 Main Street
	Kansas City, Mo. 64105
	(816) 221-9300
	
	Compuserve ID:  73214,1547
	
	





