69
How do I encode data as ICalendar format

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Variant voComponent
	Get ComContent to voComponent
	Handle hoComponent
	Get Create (RefClass(cComComponent)) to hoComponent
	Set pvComObject of hoComponent to voComponent
		Variant voComponents
		Get ComComponents of hoComponent to voComponents
		Handle hoComponents
		Get Create (RefClass(cComComponents)) to hoComponents
		Set pvComObject of hoComponents to voComponents
			Variant voComponent1
			Get ComAdd of hoComponents "VCALENDAR" to voComponent1
			Handle hoComponent1
			Get Create (RefClass(cComComponent)) to hoComponent1
			Set pvComObject of hoComponent1 to voComponent1
				Variant voProperties
				Get ComProperties of hoComponent1 to voProperties
				Handle hoProperties
				Get Create (RefClass(cComProperties)) to hoProperties
				Set pvComObject of hoProperties to voProperties
					Variant voProperty
					Get ComAdd of hoProperties "VERSION" "2.1" to voProperty
					Handle hoProperty
					Get Create (RefClass(cComProperty)) to hoProperty
					Set pvComObject of hoProperty to voProperty
						Variant voParameters
						Get ComParameters of hoProperty to voParameters
						Handle hoParameters
						Get Create (RefClass(cComParameters)) to hoParameters
						Set pvComObject of hoParameters to voParameters
							Variant vValue
								Get ComtoICalendar True OLEexPropertyTypeBoolean to vValue
							Get ComAdd of hoParameters "UNICODE" vValue to Nothing
						Send Destroy to hoParameters
					Send Destroy to hoProperty
				Send Destroy to hoProperties
				Variant voProperties1
				Get ComProperties of hoComponent1 to voProperties1
				Handle hoProperties1
				Get Create (RefClass(cComProperties)) to hoProperties1
				Set pvComObject of hoProperties1 to voProperties1
					Get ComAdd of hoProperties1 "TEXT" "This is just a bit of text to be encoded." to Nothing
				Send Destroy to hoProperties1
				Variant voProperties2
				Get ComProperties of hoComponent1 to voProperties2
				Handle hoProperties2
				Get Create (RefClass(cComProperties)) to hoProperties2
				Set pvComObject of hoProperties2 to voProperties2
					Variant vValue1
						Get ComtoICalendar "This is just a bit of text to be encoded." OLEexPropertyTypeBinary to vValue1
					Get ComAdd of hoProperties2 "BINARY" vValue1 to Nothing
				Send Destroy to hoProperties2
				Variant voComponents1
				Get ComComponents of hoComponent1 to voComponents1
				Handle hoComponents1
				Get Create (RefClass(cComComponents)) to hoComponents1
				Set pvComObject of hoComponents1 to voComponents1
					Variant voComponent2
					Get ComAdd of hoComponents1 "VEVENT" to voComponent2
					Handle hoComponent2
					Get Create (RefClass(cComComponent)) to hoComponent2
					Set pvComObject of hoComponent2 to voComponent2
						Variant voProperties3
						Get ComProperties of hoComponent2 to voProperties3
						Handle hoProperties3
						Get Create (RefClass(cComProperties)) to hoProperties3
						Set pvComObject of hoProperties3 to voProperties3
							Get ComAdd of hoProperties3 "DTSTART" "1/1/2001" to Nothing
						Send Destroy to hoProperties3
						Variant voProperties4
						Get ComProperties of hoComponent2 to voProperties4
						Handle hoProperties4
						Get Create (RefClass(cComProperties)) to hoProperties4
						Set pvComObject of hoProperties4 to voProperties4
							Get ComAdd of hoProperties4 "DTEND" "1/2/2001 10:00:00 AM" to Nothing
						Send Destroy to hoProperties4
					Send Destroy to hoComponent2
				Send Destroy to hoComponents1
			Send Destroy to hoComponent1
		Send Destroy to hoComponents
	Send Destroy to hoComponent
	Showln (ComSave(Self))
End_Procedure
68
How do I get the occurrences between giving start/end margins

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Showln "AsArray: " (ComRecurRange(Self,"DTSTART=19970310;FREQ=YEARLY;INTERVAL=2;COUNT=10;BYMONTH=1,2,3","1/1/2001","1/1/2002"))
	Showln "AsString: " (ComRecurRangeAsString(Self,"DTSTART=19970310;FREQ=YEARLY;INTERVAL=2;COUNT=10;BYMONTH=1,2,3","1/1/2001","1/1/2002"))
End_Procedure
67
How do I get the value of specified part in the recurrence expression

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Showln "FREQ: " (ComRecurPartValue(Self,"DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",OLEexRecurFREQ))
	Showln "DTSTART: " (ComRecurPartValue(Self,"DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",OLEexRecurDTSTART))
	Showln "UNTIL: " (ComRecurPartValue(Self,"DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",OLEexRecurUNTIL))
	Showln "COUNT: " (ComRecurPartValue(Self,"DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",OLEexRecurCOUNT))
	Showln "INTERVAL: " (ComRecurPartValue(Self,"DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",OLEexRecurINTERVAL))
	Showln "WKST: " (ComRecurPartValue(Self,"DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",OLEexRecurWKST))
	Showln "BYDAY: " (ComRecurPartValue(Self,"DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",OLEexRecurBYDAY))
	Showln "BYMONTHDAY: " (ComRecurPartValue(Self,"DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",OLEexRecurBYMONTHDAY))
	Showln "BYYEARDAY: " (ComRecurPartValue(Self,"DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",OLEexRecurBYYEARDAY))
	Showln "BYWEEKNO: " (ComRecurPartValue(Self,"DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",OLEexRecurBYWEEKNO))
	Showln "BYMONTH: " (ComRecurPartValue(Self,"DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",OLEexRecurBYMONTH))
	Showln "BYSETPOS: " (ComRecurPartValue(Self,"DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",OLEexRecurBYSETPOS))
	Showln "BYHOUR: " (ComRecurPartValue(Self,"DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",OLEexRecurBYHOUR))
	Showln "BYMINUTE: " (ComRecurPartValue(Self,"DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",OLEexRecurBYMINUTE))
	Showln "BYSECOND: " (ComRecurPartValue(Self,"DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",OLEexRecurBYSECOND))
End_Procedure
66
How do I check if the recurrence expression is syntactically correct (method 2)

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Showln "1.A) SyntaxError: " (ComRecurPartValue(Self,"DTSTART=20151205;FREQ=DAILY;BYDAY=MO",OLEexRecurSyntaxError))
	Showln "1.B) SyntaxErrorInfo: " (ComRecurPartValue(Self,"DTSTART=20151205;FREQ=DAILY;BYDAY=MO",OLEexRecurSyntaxErrorInfo))
	Showln "2.A) SyntaxError: " (ComRecurPartValue(Self,"FREQ=DAILY;BYDAY=MO",OLEexRecurSyntaxError))
	Showln "2.B) SyntaxErrorInfo: " (ComRecurPartValue(Self,"FREQ=DAILY;BYDAY=MO",OLEexRecurSyntaxErrorInfo))
End_Procedure
65
How do I check if the recurrence expression is syntactically correct (method 1)

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Showln "1. If negative, the expression is incorrect" (ComRecurCheck(Self,"DTSTART=20151205;FREQ=DAILY;BYDAY=MO","12/5/2015"))
	Showln "2. If negative, the expression is incorrect" (ComRecurCheck(Self,"junk","1/1/2001"))
End_Procedure
64
How do I check if a specified date match the giving recurrence

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Showln "12/5/2015" (ComRecurCheck(Self,"DTSTART=20151205;FREQ=DAILY;BYDAY=MO","12/5/2015"))
	Showln "12/7/2015" (ComRecurCheck(Self,"DTSTART=20151205;FREQ=DAILY;BYDAY=MO","12/7/2015"))
End_Procedure
63
Recur: The 2nd to last weekday of the month

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Showln (ComRecurAllAsString(Self,"DTSTART=19970929;FREQ=MONTHLY;BYDAY=MO,TU,WE,TH,FR;BYSETPOS=-2",12))
End_Procedure
62
Recur: The 3rd instance into the month of one of Tuesday, Wednesday or Thursday, for the next 3 months

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Showln (ComRecurAllAsString(Self,"DTSTART=19970904;FREQ=MONTHLY;COUNT=3;BYDAY=TU,WE,TH;BYSETPOS=3",12))
End_Procedure
61
Recur: The last work day of the month

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Showln (ComRecurAllAsString(Self,"DTSTART=19970805;FREQ=MONTHLY;BYDAY=MO,TU,WE,TH,FR;BYSETPOS=-1",12))
End_Procedure
60
Recur: An example where the days generated makes a difference because of WKST (Sample 2)

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Showln (ComRecurAllAsString(Self,"DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",12))
End_Procedure
59
Recur: An example where the days generated makes a difference because of WKST (Sample 1)

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Showln (ComRecurAllAsString(Self,"DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=MO",12))
End_Procedure
58
Recur: Every 20 minutes from 9:00 AM to 4:40 PM every day

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Showln (ComRecurAllAsString(Self,"DTSTART=19970902T090000;FREQ=DAILY;BYHOUR=9,10,11,12,13,14,15,16;BYMINUTE=0,20,40",12))
End_Procedure
57
Recur: Every hour and a half for 4 occurrences

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Showln (ComRecurAllAsString(Self,"DTSTART=19970902T090000;FREQ=MINUTELY;INTERVAL=90;COUNT=4",12))
End_Procedure
56
Recur: Every 15 minutes for 6 occurrences

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Showln (ComRecurAllAsString(Self,"DTSTART=19970902T090000;FREQ=MINUTELY;INTERVAL=15;COUNT=6",12))
End_Procedure
55
Recur: Every 3 hours from 9:00 AM to 5:00 PM on a specific day

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Showln (ComRecurAllAsString(Self,"DTSTART=19970902T090000;FREQ=HOURLY;INTERVAL=3;UNTIL=19970902T170000Z",12))
End_Procedure
54
Recur: Every four years, the first Tuesday after a Monday in November, forever (U.S. Presidential Election day)

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Showln (ComRecurAllAsString(Self,"DTSTART=19961105T090000;FREQ=YEARLY;INTERVAL=4;BYMONTH=11;BYDAY=TU;BYMONTHDAY=2,3,4,5,6,7,8",12))
End_Procedure
53
Recur: The first Saturday that follows the first Sunday of the month, forever

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Showln (ComRecurAllAsString(Self,"DTSTART=19970913T090000;FREQ=MONTHLY;BYDAY=SA;BYMONTHDAY=7,8,9,10,11,12,13",12))
End_Procedure
52
Recur: Every Friday the 13th, forever

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Showln (ComRecurAllAsString(Self,"DTSTART=19970902T090000;FREQ=MONTHLY;BYDAY=FR;BYMONTHDAY=13",12))
End_Procedure
51
Recur: Every Thursday, but only during June, July, and August, forever

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Showln (ComRecurAllAsString(Self,"DTSTART=19970605T090000;FREQ=YEARLY;BYDAY=TH;BYMONTH=6,7,8",12))
End_Procedure
50
Recur: Every Thursday in March, forever

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Showln (ComRecurAllAsString(Self,"DTSTART=19970313T090000;FREQ=YEARLY;BYMONTH=3;BYDAY=TH",12))
End_Procedure
49
Recur: Monday of week number 20 (where the default start of the week is Monday), forever

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Showln (ComRecurAllAsString(Self,"DTSTART=19970512T090000;FREQ=YEARLY;BYWEEKNO=20;BYDAY=MO",12))
End_Procedure
48
Recur: Every 20th Monday of the year, forever

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Showln (ComRecurAllAsString(Self,"DTSTART=19970101T090000;FREQ=YEARLY;BYDAY=20MO",12))
End_Procedure
47
Recur: Every 3rd year on the 1st, 100th and 200th day for 10 occurrences

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Showln (ComRecurAllAsString(Self,"DTSTART=19970101T090000;FREQ=YEARLY;INTERVAL=3;COUNT=10;BYYEARDAY=1,100,200",12))
End_Procedure
46
Recur: Every other year on January, February, and March for 10 occurrences

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Showln (ComRecurAllAsString(Self,"DTSTART=19970310T090000;FREQ=YEARLY;INTERVAL=2;COUNT=10;BYMONTH=1,2,3",12))
End_Procedure
45
Recur: Yearly in June and July for 10 occurrences

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Showln (ComRecurAllAsString(Self,"DTSTART=19970610T090000;FREQ=YEARLY;COUNT=10;BYMONTH=6,7",12))
End_Procedure
44
Recur: Every Tuesday, every other month

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Showln (ComRecurAllAsString(Self,"DTSTART=19970902T090000;FREQ=MONTHLY;INTERVAL=2;BYDAY=TU",12))
End_Procedure
43
Recur: Every 18 months on the 10th thru 15th of the month for 10 occurrences

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Showln (ComRecurAllAsString(Self,"DTSTART=19970910T090000;FREQ=MONTHLY;INTERVAL=18;COUNT=10;BYMONTHDAY=10,11,12,13,14,15",12))
End_Procedure
42
Recur: Monthly on the first and last day of the month for 10 occurrences

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Showln (ComRecurAllAsString(Self,"DTSTART=19970930T090000;FREQ=MONTHLY;COUNT=10;BYMONTHDAY=1,-1",12))
End_Procedure
41
Recur: Monthly on the 2nd and 15th of the month for 10 occurrences

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Showln (ComRecurAllAsString(Self,"DTSTART=19970902T090000;FREQ=MONTHLY;COUNT=10;BYMONTHDAY=2,15",12))
End_Procedure
40
Recur: Monthly on the third to the last day of the month, forever

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Showln (ComRecurAllAsString(Self,"DTSTART=19970928T090000;FREQ=MONTHLY;BYMONTHDAY=-3",12))
End_Procedure
39
Recur: Monthly on the second to last Monday of the month for 6 months

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Showln (ComRecurAllAsString(Self,"DTSTART=19970922T090000;FREQ=MONTHLY;COUNT=6;BYDAY=-2MO",12))
End_Procedure
38
Recur: Every other month on the 1st and last Sunday of the month for 10 occurrences

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Showln (ComRecurAllAsString(Self,"DTSTART=19970907T090000;FREQ=MONTHLY;INTERVAL=2;COUNT=10;BYDAY=1SU,-1SU",12))
End_Procedure
37
Recur: Monthly on the 1st Friday until December 24, 1997

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Showln (ComRecurAllAsString(Self,"DTSTART=19970905T090000;FREQ=MONTHLY;UNTIL=19971224T000000Z;BYDAY=1FR",12))
End_Procedure
36
Recur: Monthly on the 1st Friday for ten occurrences

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Showln (ComRecurAllAsString(Self,"DTSTART=19970905T090000;FREQ=MONTHLY;COUNT=10;BYDAY=1FR",12))
End_Procedure
35
Recur: Every other week on Tuesday and Thursday, for 8 occurrences

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Showln (ComRecurAllAsString(Self,"DTSTART=19970902T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=8;WKST=SU;BYDAY=TU,TH",12))
End_Procedure
34
Recur: Every other week on Monday, Wednesday and Friday until December 24, 1997, but starting on Tuesday, September 2, 1997

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Showln (ComRecurAllAsString(Self,"DTSTART=19970902T090000;FREQ=WEEKLY;INTERVAL=2;UNTIL=19971224T000000Z;WKST=SU;BYDAY=MO,WE,FR",12))
End_Procedure
33
Recur: Weekly on Tuesday and Thursday for 5 weeks

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Showln (ComRecurAllAsString(Self,"DTSTART=19970902T090000;FREQ=WEEKLY;UNTIL=19971007T000000Z;WKST=SU;BYDAY=TU,TH",12))
End_Procedure
32
Recur: Weekly on Tuesday and Thursday for 5 weeks

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Showln (ComRecurAllAsString(Self,"DTSTART=19970902T090000;FREQ=WEEKLY;COUNT=10;WKST=SU;BYDAY=TU,TH",12))
End_Procedure
31
Recur: Every other day - forever

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Showln (ComRecurAllAsString(Self,"DTSTART=19970902T090000;FREQ=DAILY;INTERVAL=2",12))
End_Procedure
30
Recur: Daily until December 24, 1997

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Showln (ComRecurAllAsString(Self,"DTSTART=19970902T090000;FREQ=DAILY;UNTIL=19971224T000000Z",12))
End_Procedure
29
Recur: Daily for 10 occurrences

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Showln (ComRecurAllAsString(Self,"DTSTART=19970902T090000;FREQ=DAILY;COUNT=10",12))
End_Procedure
28
How can I add a property of UTC offset type

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Variant voComponent
	Get ComContent to voComponent
	Handle hoComponent
	Get Create (RefClass(cComComponent)) to hoComponent
	Set pvComObject of hoComponent to voComponent
		Variant voComponents
		Get ComComponents of hoComponent to voComponents
		Handle hoComponents
		Get Create (RefClass(cComComponents)) to hoComponents
		Set pvComObject of hoComponents to voComponents
			Variant voComponent1
			Get ComAdd of hoComponents "VCALENDAR" to voComponent1
			Handle hoComponent1
			Get Create (RefClass(cComComponent)) to hoComponent1
			Set pvComObject of hoComponent1 to voComponent1
				Variant voProperties
				Get ComProperties of hoComponent1 to voProperties
				Handle hoProperties
				Get Create (RefClass(cComProperties)) to hoProperties
				Set pvComObject of hoProperties to voProperties
					Get ComAdd of hoProperties "UTCOffset" "+0100" to Nothing
				Send Destroy to hoProperties
			Send Destroy to hoComponent1
		Send Destroy to hoComponents
	Send Destroy to hoComponent
	Showln (ComSave(Self))
End_Procedure
27
How can I add a property of URI type

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Variant voComponent
	Get ComContent to voComponent
	Handle hoComponent
	Get Create (RefClass(cComComponent)) to hoComponent
	Set pvComObject of hoComponent to voComponent
		Variant voComponents
		Get ComComponents of hoComponent to voComponents
		Handle hoComponents
		Get Create (RefClass(cComComponents)) to hoComponents
		Set pvComObject of hoComponents to voComponents
			Variant voComponent1
			Get ComAdd of hoComponents "VCALENDAR" to voComponent1
			Handle hoComponent1
			Get Create (RefClass(cComComponent)) to hoComponent1
			Set pvComObject of hoComponent1 to voComponent1
				Variant voProperties
				Get ComProperties of hoComponent1 to voProperties
				Handle hoProperties
				Get Create (RefClass(cComProperties)) to hoProperties
				Set pvComObject of hoProperties to voProperties
					Get ComAdd of hoProperties "URI" "http://www.exontrol.com" to Nothing
				Send Destroy to hoProperties
			Send Destroy to hoComponent1
		Send Destroy to hoComponents
	Send Destroy to hoComponent
	Showln (ComSave(Self))
End_Procedure
26
How can I add a property of time type

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Variant voComponent
	Get ComContent to voComponent
	Handle hoComponent
	Get Create (RefClass(cComComponent)) to hoComponent
	Set pvComObject of hoComponent to voComponent
		Variant voComponents
		Get ComComponents of hoComponent to voComponents
		Handle hoComponents
		Get Create (RefClass(cComComponents)) to hoComponents
		Set pvComObject of hoComponents to voComponents
			Variant voComponent1
			Get ComAdd of hoComponents "VCALENDAR" to voComponent1
			Handle hoComponent1
			Get Create (RefClass(cComComponent)) to hoComponent1
			Set pvComObject of hoComponent1 to voComponent1
				Variant voProperties
				Get ComProperties of hoComponent1 to voProperties
				Handle hoProperties
				Get Create (RefClass(cComProperties)) to hoProperties
				Set pvComObject of hoProperties to voProperties
					Get ComAdd of hoProperties "Time1" "12/30/1899 12:00:00 PM" to Nothing
				Send Destroy to hoProperties
				Variant voProperties1
				Get ComProperties of hoComponent1 to voProperties1
				Handle hoProperties1
				Get Create (RefClass(cComProperties)) to hoProperties1
				Set pvComObject of hoProperties1 to voProperties1
					Variant vValue
						Get ComtoICalendar 0.5 OLEexPropertyTypeTime to vValue
					Get ComAdd of hoProperties1 "Time2" vValue to Nothing
				Send Destroy to hoProperties1
				Variant voProperties2
				Get ComProperties of hoComponent1 to voProperties2
				Handle hoProperties2
				Get Create (RefClass(cComProperties)) to hoProperties2
				Set pvComObject of hoProperties2 to voProperties2
					Variant voProperty
					Get ComAdd of hoProperties2 "Time3" Nothing to voProperty
					Handle hoProperty
					Get Create (RefClass(cComProperty)) to hoProperty
					Set pvComObject of hoProperty to voProperty
						Set ComValue of hoProperty to 0.5
						Set ComType of hoProperty to OLEexPropertyTypeTime
					Send Destroy to hoProperty
				Send Destroy to hoProperties2
			Send Destroy to hoComponent1
		Send Destroy to hoComponents
	Send Destroy to hoComponent
	Showln (ComSave(Self))
End_Procedure
25
How can I add a property of text/string type

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Variant voComponent
	Get ComContent to voComponent
	Handle hoComponent
	Get Create (RefClass(cComComponent)) to hoComponent
	Set pvComObject of hoComponent to voComponent
		Variant voComponents
		Get ComComponents of hoComponent to voComponents
		Handle hoComponents
		Get Create (RefClass(cComComponents)) to hoComponents
		Set pvComObject of hoComponents to voComponents
			Variant voComponent1
			Get ComAdd of hoComponents "VCALENDAR" to voComponent1
			Handle hoComponent1
			Get Create (RefClass(cComComponent)) to hoComponent1
			Set pvComObject of hoComponent1 to voComponent1
				Variant voProperties
				Get ComProperties of hoComponent1 to voProperties
				Handle hoProperties
				Get Create (RefClass(cComProperties)) to hoProperties
				Set pvComObject of hoProperties to voProperties
					Get ComAdd of hoProperties "Text1" "A1" to Nothing
				Send Destroy to hoProperties
				Variant voProperties1
				Get ComProperties of hoComponent1 to voProperties1
				Handle hoProperties1
				Get Create (RefClass(cComProperties)) to hoProperties1
				Set pvComObject of hoProperties1 to voProperties1
					Variant vValue
						Get ComtoICalendar "A1" OLEexPropertyTypeText to vValue
					Get ComAdd of hoProperties1 "Text2" vValue to Nothing
				Send Destroy to hoProperties1
				Variant voProperties2
				Get ComProperties of hoComponent1 to voProperties2
				Handle hoProperties2
				Get Create (RefClass(cComProperties)) to hoProperties2
				Set pvComObject of hoProperties2 to voProperties2
					Variant voProperty
					Get ComAdd of hoProperties2 "Text3" Nothing to voProperty
					Handle hoProperty
					Get Create (RefClass(cComProperty)) to hoProperty
					Set pvComObject of hoProperty to voProperty
						Set ComValue of hoProperty to "A1"
						Set ComType of hoProperty to OLEexPropertyTypeText
					Send Destroy to hoProperty
				Send Destroy to hoProperties2
			Send Destroy to hoComponent1
		Send Destroy to hoComponents
	Send Destroy to hoComponent
	Showln (ComSave(Self))
End_Procedure
24
How can I find properties of recurence type

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Variant voComponent
	Get ComContent to voComponent
	Handle hoComponent
	Get Create (RefClass(cComComponent)) to hoComponent
	Set pvComObject of hoComponent to voComponent
		Variant voComponents
		Get ComComponents of hoComponent to voComponents
		Handle hoComponents
		Get Create (RefClass(cComComponents)) to hoComponents
		Set pvComObject of hoComponents to voComponents
			Variant voComponent1
			Get ComAdd of hoComponents "VCALENDAR" to voComponent1
			Handle hoComponent1
			Get Create (RefClass(cComComponent)) to hoComponent1
			Set pvComObject of hoComponent1 to voComponent1
				Variant voProperties
				Get ComProperties of hoComponent1 to voProperties
				Handle hoProperties
				Get Create (RefClass(cComProperties)) to hoProperties
				Set pvComObject of hoProperties to voProperties
					Get ComAdd of hoProperties "Recur" "FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=SA,SU" to Nothing
				Send Destroy to hoProperties
			Send Destroy to hoComponent1
		Send Destroy to hoComponents
	Send Destroy to hoComponent
	Variant v
	Variant voComponent2
	Get ComRoot to voComponent2
	Handle hoComponent2
	Get Create (RefClass(cComComponent)) to hoComponent2
	Set pvComObject of hoComponent2 to voComponent2
		Variant voProperties1
		Get ComProperties of hoComponent2 to voProperties1
		Handle hoProperties1
		Get Create (RefClass(cComProperties)) to hoProperties1
		Set pvComObject of hoProperties1 to voProperties1
			Get ComItem of hoProperties1 "Recur" to v
		Send Destroy to hoProperties1
	Send Destroy to hoComponent2
	Variant p
	Move v to p
	Variant i
	Get ComtoICalendar p p to i
	Showln "icalendar:" i
	Showln "all:" (ComvaluesFromICalendar(Self,i,p,""))
	Showln "FREQ:" (ComvaluesFromICalendar(Self,i,p,"FREQ"))
	Showln "UNTIL:" (ComvaluesFromICalendar(Self,i,p,"UNTIL"))
	Showln "COUNT:" (ComvaluesFromICalendar(Self,i,p,"COUNT"))
	Showln "INTERVAL:" (ComvaluesFromICalendar(Self,i,p,"INTERVAL"))
	Showln "BYSECOND:" (ComvaluesFromICalendar(Self,i,p,"BYSECOND"))
	Showln "BYMINUTE:" (ComvaluesFromICalendar(Self,i,p,"BYMINUTE"))
	Showln "BYHOUR:" (ComvaluesFromICalendar(Self,i,p,"BYHOUR"))
	Showln "BYDAY:" (ComvaluesFromICalendar(Self,i,p,"BYDAY"))
	Showln "BYMONTHDAY:" (ComvaluesFromICalendar(Self,i,p,"BYMONTHDAY"))
	Showln "BYYEARDAY:" (ComvaluesFromICalendar(Self,i,p,"BYYEARDAY"))
	Showln "BYWEEKNO:" (ComvaluesFromICalendar(Self,i,p,"BYWEEKNO"))
	Showln "BYMONTH:" (ComvaluesFromICalendar(Self,i,p,"BYMONTH"))
	Showln "BYSETPOS:" (ComvaluesFromICalendar(Self,i,p,"BYSETPOS"))
	Showln "WKST:" (ComvaluesFromICalendar(Self,i,p,"WKST"))
End_Procedure
23
How can I add a property of recurrence type

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Variant voComponent
	Get ComContent to voComponent
	Handle hoComponent
	Get Create (RefClass(cComComponent)) to hoComponent
	Set pvComObject of hoComponent to voComponent
		Variant voComponents
		Get ComComponents of hoComponent to voComponents
		Handle hoComponents
		Get Create (RefClass(cComComponents)) to hoComponents
		Set pvComObject of hoComponents to voComponents
			Variant voComponent1
			Get ComAdd of hoComponents "VCALENDAR" to voComponent1
			Handle hoComponent1
			Get Create (RefClass(cComComponent)) to hoComponent1
			Set pvComObject of hoComponent1 to voComponent1
				Variant voProperties
				Get ComProperties of hoComponent1 to voProperties
				Handle hoProperties
				Get Create (RefClass(cComProperties)) to hoProperties
				Set pvComObject of hoProperties to voProperties
					Get ComAdd of hoProperties "Recur" "FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU" to Nothing
				Send Destroy to hoProperties
			Send Destroy to hoComponent1
		Send Destroy to hoComponents
	Send Destroy to hoComponent
	Showln (ComSave(Self))
End_Procedure
22
How can I find the duration in weeks, days, hours, minutes, seconds from a property of duration type

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Variant voComponent
	Get ComContent to voComponent
	Handle hoComponent
	Get Create (RefClass(cComComponent)) to hoComponent
	Set pvComObject of hoComponent to voComponent
		Variant voComponents
		Get ComComponents of hoComponent to voComponents
		Handle hoComponents
		Get Create (RefClass(cComComponents)) to hoComponents
		Set pvComObject of hoComponents to voComponents
			Variant voComponent1
			Get ComAdd of hoComponents "VCALENDAR" to voComponent1
			Handle hoComponent1
			Get Create (RefClass(cComComponent)) to hoComponent1
			Set pvComObject of hoComponent1 to voComponent1
				Variant voProperties
				Get ComProperties of hoComponent1 to voProperties
				Handle hoProperties
				Get Create (RefClass(cComProperties)) to hoProperties
				Set pvComObject of hoProperties to voProperties
					Variant vValue
						Get ComvaluesToICalendar "Start=#1/1/2001#;Duration=1" OLEexPropertyTypePeriod to vValue
					Get ComAdd of hoProperties "Period" vValue to Nothing
				Send Destroy to hoProperties
			Send Destroy to hoComponent1
		Send Destroy to hoComponents
	Send Destroy to hoComponent
	Variant v
	Variant voComponent2
	Get ComRoot to voComponent2
	Handle hoComponent2
	Get Create (RefClass(cComComponent)) to hoComponent2
	Set pvComObject of hoComponent2 to voComponent2
		Variant voProperties1
		Get ComProperties of hoComponent2 to voProperties1
		Handle hoProperties1
		Get Create (RefClass(cComProperties)) to hoProperties1
		Set pvComObject of hoProperties1 to voProperties1
			Get ComItem of hoProperties1 "Period" to v
		Send Destroy to hoProperties1
	Send Destroy to hoComponent2
	Variant p
	Move v to p
	Variant i
	Get ComtoICalendar p p to i
	Showln "icalendar:" i
	Showln "all:" (ComvaluesFromICalendar(Self,i,p,""))
	Showln "start:" (ComvaluesFromICalendar(Self,i,p,"Start"))
	Showln "end:" (ComvaluesFromICalendar(Self,i,p,"End"))
	Showln "duration:" (ComvaluesFromICalendar(Self,i,p,"Duration"))
	Showln "weeks:" (ComvaluesFromICalendar(Self,i,p,"W"))
	Showln "days:" (ComvaluesFromICalendar(Self,i,p,"D"))
	Showln "hour:" (ComvaluesFromICalendar(Self,i,p,"H"))
	Showln "min:" (ComvaluesFromICalendar(Self,i,p,"M"))
	Showln "sec:" (ComvaluesFromICalendar(Self,i,p,"S"))
End_Procedure
21
How can I add a property of period type

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Variant voComponent
	Get ComContent to voComponent
	Handle hoComponent
	Get Create (RefClass(cComComponent)) to hoComponent
	Set pvComObject of hoComponent to voComponent
		Variant voComponents
		Get ComComponents of hoComponent to voComponents
		Handle hoComponents
		Get Create (RefClass(cComComponents)) to hoComponents
		Set pvComObject of hoComponents to voComponents
			Variant voComponent1
			Get ComAdd of hoComponents "VCALENDAR" to voComponent1
			Handle hoComponent1
			Get Create (RefClass(cComComponent)) to hoComponent1
			Set pvComObject of hoComponent1 to voComponent1
				Variant voProperties
				Get ComProperties of hoComponent1 to voProperties
				Handle hoProperties
				Get Create (RefClass(cComProperties)) to hoProperties
				Set pvComObject of hoProperties to voProperties
					Variant vValue
						Get ComvaluesToICalendar "Start=#1/1/2001#;Duration=1" OLEexPropertyTypePeriod to vValue
					Get ComAdd of hoProperties "Period1" vValue to Nothing
				Send Destroy to hoProperties
				Variant voProperties1
				Get ComProperties of hoComponent1 to voProperties1
				Handle hoProperties1
				Get Create (RefClass(cComProperties)) to hoProperties1
				Set pvComObject of hoProperties1 to voProperties1
					Variant vValue1
						Get ComvaluesToICalendar "Start=#1/1/2001#;End=#1/2/2001#" OLEexPropertyTypePeriod to vValue1
					Get ComAdd of hoProperties1 "Period2" vValue1 to Nothing
				Send Destroy to hoProperties1
				Variant voProperties2
				Get ComProperties of hoComponent1 to voProperties2
				Handle hoProperties2
				Get Create (RefClass(cComProperties)) to hoProperties2
				Set pvComObject of hoProperties2 to voProperties2
					Variant vValue2
						Get ComvaluesToICalendar "Duration=1;End=#1/2/2001#" OLEexPropertyTypePeriod to vValue2
					Get ComAdd of hoProperties2 "Period3" vValue2 to Nothing
				Send Destroy to hoProperties2
			Send Destroy to hoComponent1
		Send Destroy to hoComponents
	Send Destroy to hoComponent
	Showln (ComSave(Self))
End_Procedure
20
How can I add a property of integer type

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Variant voComponent
	Get ComContent to voComponent
	Handle hoComponent
	Get Create (RefClass(cComComponent)) to hoComponent
	Set pvComObject of hoComponent to voComponent
		Variant voComponents
		Get ComComponents of hoComponent to voComponents
		Handle hoComponents
		Get Create (RefClass(cComComponents)) to hoComponents
		Set pvComObject of hoComponents to voComponents
			Variant voComponent1
			Get ComAdd of hoComponents "VCALENDAR" to voComponent1
			Handle hoComponent1
			Get Create (RefClass(cComComponent)) to hoComponent1
			Set pvComObject of hoComponent1 to voComponent1
				Variant voProperties
				Get ComProperties of hoComponent1 to voProperties
				Handle hoProperties
				Get Create (RefClass(cComProperties)) to hoProperties
				Set pvComObject of hoProperties to voProperties
					Get ComAdd of hoProperties "Integer1" 1 to Nothing
				Send Destroy to hoProperties
				Variant voProperties1
				Get ComProperties of hoComponent1 to voProperties1
				Handle hoProperties1
				Get Create (RefClass(cComProperties)) to hoProperties1
				Set pvComObject of hoProperties1 to voProperties1
					Variant vValue
						Get ComtoICalendar 1 OLEexPropertyTypeInteger to vValue
					Get ComAdd of hoProperties1 "Integer2" vValue to Nothing
				Send Destroy to hoProperties1
				Variant voProperties2
				Get ComProperties of hoComponent1 to voProperties2
				Handle hoProperties2
				Get Create (RefClass(cComProperties)) to hoProperties2
				Set pvComObject of hoProperties2 to voProperties2
					Variant voProperty
					Get ComAdd of hoProperties2 "Integer3" Nothing to voProperty
					Handle hoProperty
					Get Create (RefClass(cComProperty)) to hoProperty
					Set pvComObject of hoProperty to voProperty
						Set ComValue of hoProperty to 1
						Set ComType of hoProperty to OLEexPropertyTypeInteger
					Send Destroy to hoProperty
				Send Destroy to hoProperties2
			Send Destroy to hoComponent1
		Send Destroy to hoComponents
	Send Destroy to hoComponent
	Showln (ComSave(Self))
End_Procedure
19
How can I add a property of float type

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Variant voComponent
	Get ComContent to voComponent
	Handle hoComponent
	Get Create (RefClass(cComComponent)) to hoComponent
	Set pvComObject of hoComponent to voComponent
		Variant voComponents
		Get ComComponents of hoComponent to voComponents
		Handle hoComponents
		Get Create (RefClass(cComComponents)) to hoComponents
		Set pvComObject of hoComponents to voComponents
			Variant voComponent1
			Get ComAdd of hoComponents "VCALENDAR" to voComponent1
			Handle hoComponent1
			Get Create (RefClass(cComComponent)) to hoComponent1
			Set pvComObject of hoComponent1 to voComponent1
				Variant voProperties
				Get ComProperties of hoComponent1 to voProperties
				Handle hoProperties
				Get Create (RefClass(cComProperties)) to hoProperties
				Set pvComObject of hoProperties to voProperties
					Get ComAdd of hoProperties "Float1" 1.5 to Nothing
				Send Destroy to hoProperties
				Variant voProperties1
				Get ComProperties of hoComponent1 to voProperties1
				Handle hoProperties1
				Get Create (RefClass(cComProperties)) to hoProperties1
				Set pvComObject of hoProperties1 to voProperties1
					Variant vValue
						Get ComtoICalendar 1.5 OLEexPropertyTypeFloat to vValue
					Get ComAdd of hoProperties1 "Float2" vValue to Nothing
				Send Destroy to hoProperties1
				Variant voProperties2
				Get ComProperties of hoComponent1 to voProperties2
				Handle hoProperties2
				Get Create (RefClass(cComProperties)) to hoProperties2
				Set pvComObject of hoProperties2 to voProperties2
					Variant voProperty
					Get ComAdd of hoProperties2 "Float3" Nothing to voProperty
					Handle hoProperty
					Get Create (RefClass(cComProperty)) to hoProperty
					Set pvComObject of hoProperty to voProperty
						Set ComValue of hoProperty to 1.5
						Set ComType of hoProperty to OLEexPropertyTypeFloat
					Send Destroy to hoProperty
				Send Destroy to hoProperties2
			Send Destroy to hoComponent1
		Send Destroy to hoComponents
	Send Destroy to hoComponent
	Showln (ComSave(Self))
End_Procedure
18
How do I get the type of the property

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Variant voComponent
	Get ComContent to voComponent
	Handle hoComponent
	Get Create (RefClass(cComComponent)) to hoComponent
	Set pvComObject of hoComponent to voComponent
		Variant voComponents
		Get ComComponents of hoComponent to voComponents
		Handle hoComponents
		Get Create (RefClass(cComComponents)) to hoComponents
		Set pvComObject of hoComponents to voComponents
			Variant voComponent1
			Get ComAdd of hoComponents "VCALENDAR" to voComponent1
			Handle hoComponent1
			Get Create (RefClass(cComComponent)) to hoComponent1
			Set pvComObject of hoComponent1 to voComponent1
				Variant voProperties
				Get ComProperties of hoComponent1 to voProperties
				Handle hoProperties
				Get Create (RefClass(cComProperties)) to hoProperties
				Set pvComObject of hoProperties to voProperties
					Variant vValue
						Get ComtoICalendar 2.5 OLEexPropertyTypeDuration to vValue
					Get ComAdd of hoProperties "Duration1" vValue to Nothing
				Send Destroy to hoProperties
				Variant voProperties1
				Get ComProperties of hoComponent1 to voProperties1
				Handle hoProperties1
				Get Create (RefClass(cComProperties)) to hoProperties1
				Set pvComObject of hoProperties1 to voProperties1
					Variant voProperty
					Get ComAdd of hoProperties1 "Duration2" Nothing to voProperty
					Handle hoProperty
					Get Create (RefClass(cComProperty)) to hoProperty
					Set pvComObject of hoProperty to voProperty
						Set ComValue of hoProperty to 2.5
						Set ComType of hoProperty to OLEexPropertyTypeDuration
					Send Destroy to hoProperty
				Send Destroy to hoProperties1
			Send Destroy to hoComponent1
		Send Destroy to hoComponents
	Send Destroy to hoComponent
	Variant voComponent2
	Get ComRoot to voComponent2
	Handle hoComponent2
	Get Create (RefClass(cComComponent)) to hoComponent2
	Set pvComObject of hoComponent2 to voComponent2
		Variant voProperties2
		Get ComProperties of hoComponent2 to voProperties2
		Handle hoProperties2
		Get Create (RefClass(cComProperties)) to hoProperties2
		Set pvComObject of hoProperties2 to voProperties2
			Variant voProperty1
			Get ComItem of hoProperties2 "Duration1" to voProperty1
			Handle hoProperty1
			Get Create (RefClass(cComProperty)) to hoProperty1
			Set pvComObject of hoProperty1 to voProperty1
				Variant voProperty2
				Get ComItem of hoProperty1 "Duration1" to voProperty2
				Handle hoProperty2
				Get Create (RefClass(cComProperty)) to hoProperty2
				Set pvComObject of hoProperty2 to voProperty2
					Showln (ComName(hoProperty2)) "Guess" (ComGuessType(hoProperty2))
					Showln (ComName(hoProperty2)) "Type" (ComType(hoProperty2))
				Send Destroy to hoProperty2
			Send Destroy to hoProperty1
		Send Destroy to hoProperties2
	Send Destroy to hoComponent2
	Variant voComponent3
	Get ComRoot to voComponent3
	Handle hoComponent3
	Get Create (RefClass(cComComponent)) to hoComponent3
	Set pvComObject of hoComponent3 to voComponent3
		Variant voProperties3
		Get ComProperties of hoComponent3 to voProperties3
		Handle hoProperties3
		Get Create (RefClass(cComProperties)) to hoProperties3
		Set pvComObject of hoProperties3 to voProperties3
			Variant voProperty3
			Get ComItem of hoProperties3 "Duration2" to voProperty3
			Handle hoProperty3
			Get Create (RefClass(cComProperty)) to hoProperty3
			Set pvComObject of hoProperty3 to voProperty3
				Variant voProperty4
				Get ComItem of hoProperty3 "Duration2" to voProperty4
				Handle hoProperty4
				Get Create (RefClass(cComProperty)) to hoProperty4
				Set pvComObject of hoProperty4 to voProperty4
					Showln (ComName(hoProperty4)) "Guess" (ComGuessType(hoProperty4))
					Showln (ComName(hoProperty4)) "Type" (ComType(hoProperty4))
				Send Destroy to hoProperty4
			Send Destroy to hoProperty3
		Send Destroy to hoProperties3
	Send Destroy to hoComponent3
End_Procedure
17
How can I get values of the duration iCalendar format

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Showln "all:" (ComvaluesFromICalendar(Self,"P1D",OLEexPropertyTypeDuration,""))
	Showln "duration:" (ComvaluesFromICalendar(Self,"P1D",OLEexPropertyTypeDuration,"Duration"))
End_Procedure
16
How can I find the duration in weeks, days, hours, minutes, seconds from a property of duration type

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Variant voComponent
	Get ComContent to voComponent
	Handle hoComponent
	Get Create (RefClass(cComComponent)) to hoComponent
	Set pvComObject of hoComponent to voComponent
		Variant voComponents
		Get ComComponents of hoComponent to voComponents
		Handle hoComponents
		Get Create (RefClass(cComComponents)) to hoComponents
		Set pvComObject of hoComponents to voComponents
			Variant voComponent1
			Get ComAdd of hoComponents "VCALENDAR" to voComponent1
			Handle hoComponent1
			Get Create (RefClass(cComComponent)) to hoComponent1
			Set pvComObject of hoComponent1 to voComponent1
				Variant voProperties
				Get ComProperties of hoComponent1 to voProperties
				Handle hoProperties
				Get Create (RefClass(cComProperties)) to hoProperties
				Set pvComObject of hoProperties to voProperties
					Variant vValue
						Get ComtoICalendar 3.325 OLEexPropertyTypeDuration to vValue
					Get ComAdd of hoProperties "Duration" vValue to Nothing
				Send Destroy to hoProperties
			Send Destroy to hoComponent1
		Send Destroy to hoComponents
	Send Destroy to hoComponent
	Variant v
	Variant voComponent2
	Get ComRoot to voComponent2
	Handle hoComponent2
	Get Create (RefClass(cComComponent)) to hoComponent2
	Set pvComObject of hoComponent2 to voComponent2
		Variant voProperties1
		Get ComProperties of hoComponent2 to voProperties1
		Handle hoProperties1
		Get Create (RefClass(cComProperties)) to hoProperties1
		Set pvComObject of hoProperties1 to voProperties1
			Get ComItem of hoProperties1 "Duration" to v
		Send Destroy to hoProperties1
	Send Destroy to hoComponent2
	Variant p
	Move v to p
	Variant i
	Get ComtoICalendar p p to i
	Showln "icalendar:" i
	Showln "all:" (ComvaluesFromICalendar(Self,i,p,""))
	Showln "duration:" (ComvaluesFromICalendar(Self,i,p,"Duration"))
	Showln "weeks:" (ComvaluesFromICalendar(Self,i,p,"W"))
	Showln "days:" (ComvaluesFromICalendar(Self,i,p,"D"))
	Showln "hour:" (ComvaluesFromICalendar(Self,i,p,"H"))
	Showln "min:" (ComvaluesFromICalendar(Self,i,p,"M"))
	Showln "sec:" (ComvaluesFromICalendar(Self,i,p,"S"))
End_Procedure
15
How can I add a property of duration type

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Variant voComponent
	Get ComContent to voComponent
	Handle hoComponent
	Get Create (RefClass(cComComponent)) to hoComponent
	Set pvComObject of hoComponent to voComponent
		Variant voComponents
		Get ComComponents of hoComponent to voComponents
		Handle hoComponents
		Get Create (RefClass(cComComponents)) to hoComponents
		Set pvComObject of hoComponents to voComponents
			Variant voComponent1
			Get ComAdd of hoComponents "VCALENDAR" to voComponent1
			Handle hoComponent1
			Get Create (RefClass(cComComponent)) to hoComponent1
			Set pvComObject of hoComponent1 to voComponent1
				Variant voProperties
				Get ComProperties of hoComponent1 to voProperties
				Handle hoProperties
				Get Create (RefClass(cComProperties)) to hoProperties
				Set pvComObject of hoProperties to voProperties
					Variant vValue
						Get ComtoICalendar 2.5 OLEexPropertyTypeDuration to vValue
					Get ComAdd of hoProperties "Duration1" vValue to Nothing
				Send Destroy to hoProperties
				Variant voProperties1
				Get ComProperties of hoComponent1 to voProperties1
				Handle hoProperties1
				Get Create (RefClass(cComProperties)) to hoProperties1
				Set pvComObject of hoProperties1 to voProperties1
					Variant voProperty
					Get ComAdd of hoProperties1 "Duration2" Nothing to voProperty
					Handle hoProperty
					Get Create (RefClass(cComProperty)) to hoProperty
					Set pvComObject of hoProperty to voProperty
						Set ComValue of hoProperty to 2.5
						Set ComType of hoProperty to OLEexPropertyTypeDuration
					Send Destroy to hoProperty
				Send Destroy to hoProperties1
				Variant voProperties2
				Get ComProperties of hoComponent1 to voProperties2
				Handle hoProperties2
				Get Create (RefClass(cComProperties)) to hoProperties2
				Set pvComObject of hoProperties2 to voProperties2
					Variant vValue1
						Get ComvaluesToICalendar "D=2;H=12" OLEexPropertyTypeDuration to vValue1
					Get ComAdd of hoProperties2 "Duration3" vValue1 to Nothing
				Send Destroy to hoProperties2
			Send Destroy to hoComponent1
		Send Destroy to hoComponents
	Send Destroy to hoComponent
	Showln (ComSave(Self))
End_Procedure
14
How can I add a property of date-time type

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Variant voComponent
	Get ComContent to voComponent
	Handle hoComponent
	Get Create (RefClass(cComComponent)) to hoComponent
	Set pvComObject of hoComponent to voComponent
		Variant voComponents
		Get ComComponents of hoComponent to voComponents
		Handle hoComponents
		Get Create (RefClass(cComComponents)) to hoComponents
		Set pvComObject of hoComponents to voComponents
			Variant voComponent1
			Get ComAdd of hoComponents "VCALENDAR" to voComponent1
			Handle hoComponent1
			Get Create (RefClass(cComComponent)) to hoComponent1
			Set pvComObject of hoComponent1 to voComponent1
				Variant voProperties
				Get ComProperties of hoComponent1 to voProperties
				Handle hoProperties
				Get Create (RefClass(cComProperties)) to hoProperties
				Set pvComObject of hoProperties to voProperties
					Get ComAdd of hoProperties "DateTime1" "1/1/2001 12:00:00 PM" to Nothing
				Send Destroy to hoProperties
				Variant voProperties1
				Get ComProperties of hoComponent1 to voProperties1
				Handle hoProperties1
				Get Create (RefClass(cComProperties)) to hoProperties1
				Set pvComObject of hoProperties1 to voProperties1
					Variant vValue
						Get ComtoICalendar "1/1/2001" OLEexPropertyTypeDateTime to vValue
					Get ComAdd of hoProperties1 "DateTime2" vValue to Nothing
				Send Destroy to hoProperties1
				Variant voProperties2
				Get ComProperties of hoComponent1 to voProperties2
				Handle hoProperties2
				Get Create (RefClass(cComProperties)) to hoProperties2
				Set pvComObject of hoProperties2 to voProperties2
					Variant voProperty
					Get ComAdd of hoProperties2 "DateTime3" Nothing to voProperty
					Handle hoProperty
					Get Create (RefClass(cComProperty)) to hoProperty
					Set pvComObject of hoProperty to voProperty
						Set ComValue of hoProperty to "1/1/2001"
						Set ComType of hoProperty to OLEexPropertyTypeDateTime
					Send Destroy to hoProperty
				Send Destroy to hoProperties2
			Send Destroy to hoComponent1
		Send Destroy to hoComponents
	Send Destroy to hoComponent
	Showln (ComSave(Self))
End_Procedure
13
How can I add a property of date type

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Variant voComponent
	Get ComContent to voComponent
	Handle hoComponent
	Get Create (RefClass(cComComponent)) to hoComponent
	Set pvComObject of hoComponent to voComponent
		Variant voComponents
		Get ComComponents of hoComponent to voComponents
		Handle hoComponents
		Get Create (RefClass(cComComponents)) to hoComponents
		Set pvComObject of hoComponents to voComponents
			Variant voComponent1
			Get ComAdd of hoComponents "VCALENDAR" to voComponent1
			Handle hoComponent1
			Get Create (RefClass(cComComponent)) to hoComponent1
			Set pvComObject of hoComponent1 to voComponent1
				Variant voProperties
				Get ComProperties of hoComponent1 to voProperties
				Handle hoProperties
				Get Create (RefClass(cComProperties)) to hoProperties
				Set pvComObject of hoProperties to voProperties
					Get ComAdd of hoProperties "Date1" "1/1/2001" to Nothing
				Send Destroy to hoProperties
				Variant voProperties1
				Get ComProperties of hoComponent1 to voProperties1
				Handle hoProperties1
				Get Create (RefClass(cComProperties)) to hoProperties1
				Set pvComObject of hoProperties1 to voProperties1
					Variant vValue
						Get ComtoICalendar "1/1/2001" OLEexPropertyTypeDate to vValue
					Get ComAdd of hoProperties1 "Date2" vValue to Nothing
				Send Destroy to hoProperties1
				Variant voProperties2
				Get ComProperties of hoComponent1 to voProperties2
				Handle hoProperties2
				Get Create (RefClass(cComProperties)) to hoProperties2
				Set pvComObject of hoProperties2 to voProperties2
					Variant voProperty
					Get ComAdd of hoProperties2 "Date3" Nothing to voProperty
					Handle hoProperty
					Get Create (RefClass(cComProperty)) to hoProperty
					Set pvComObject of hoProperty to voProperty
						Set ComValue of hoProperty to "1/1/2001"
						Set ComType of hoProperty to OLEexPropertyTypeDate
					Send Destroy to hoProperty
				Send Destroy to hoProperties2
			Send Destroy to hoComponent1
		Send Destroy to hoComponents
	Send Destroy to hoComponent
	Showln (ComSave(Self))
End_Procedure
12
How can I add a property of Calendar User Address type

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Variant voComponent
	Get ComContent to voComponent
	Handle hoComponent
	Get Create (RefClass(cComComponent)) to hoComponent
	Set pvComObject of hoComponent to voComponent
		Variant voComponents
		Get ComComponents of hoComponent to voComponents
		Handle hoComponents
		Get Create (RefClass(cComComponents)) to hoComponents
		Set pvComObject of hoComponents to voComponents
			Variant voComponent1
			Get ComAdd of hoComponents "VCALENDAR" to voComponent1
			Handle hoComponent1
			Get Create (RefClass(cComComponent)) to hoComponent1
			Set pvComObject of hoComponent1 to voComponent1
				Variant voProperties
				Get ComProperties of hoComponent1 to voProperties
				Handle hoProperties
				Get Create (RefClass(cComProperties)) to hoProperties
				Set pvComObject of hoProperties to voProperties
					Get ComAdd of hoProperties "caladdress1" "mailto:support@exontrol.com" to Nothing
				Send Destroy to hoProperties
				Variant voProperties1
				Get ComProperties of hoComponent1 to voProperties1
				Handle hoProperties1
				Get Create (RefClass(cComProperties)) to hoProperties1
				Set pvComObject of hoProperties1 to voProperties1
					Variant vValue
						Get ComtoICalendar "mailto:support@exontrol.com" OLEexPropertyTypeCalAddress to vValue
					Get ComAdd of hoProperties1 "caladdress2" vValue to Nothing
				Send Destroy to hoProperties1
				Variant voProperties2
				Get ComProperties of hoComponent1 to voProperties2
				Handle hoProperties2
				Get Create (RefClass(cComProperties)) to hoProperties2
				Set pvComObject of hoProperties2 to voProperties2
					Variant voProperty
					Get ComAdd of hoProperties2 "caladdress3" Nothing to voProperty
					Handle hoProperty
					Get Create (RefClass(cComProperty)) to hoProperty
					Set pvComObject of hoProperty to voProperty
						Set ComValue of hoProperty to "mailto:support@exontrol.com"
						Set ComType of hoProperty to OLEexPropertyTypeCalAddress
					Send Destroy to hoProperty
				Send Destroy to hoProperties2
			Send Destroy to hoComponent1
		Send Destroy to hoComponents
	Send Destroy to hoComponent
	Showln (ComSave(Self))
End_Procedure
11
How can I add a property of boolean type

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Variant voComponent
	Get ComContent to voComponent
	Handle hoComponent
	Get Create (RefClass(cComComponent)) to hoComponent
	Set pvComObject of hoComponent to voComponent
		Variant voComponents
		Get ComComponents of hoComponent to voComponents
		Handle hoComponents
		Get Create (RefClass(cComComponents)) to hoComponents
		Set pvComObject of hoComponents to voComponents
			Variant voComponent1
			Get ComAdd of hoComponents "VCALENDAR" to voComponent1
			Handle hoComponent1
			Get Create (RefClass(cComComponent)) to hoComponent1
			Set pvComObject of hoComponent1 to voComponent1
				Variant voProperties
				Get ComProperties of hoComponent1 to voProperties
				Handle hoProperties
				Get Create (RefClass(cComProperties)) to hoProperties
				Set pvComObject of hoProperties to voProperties
					Get ComAdd of hoProperties "Boolean1" True to Nothing
				Send Destroy to hoProperties
				Variant voProperties1
				Get ComProperties of hoComponent1 to voProperties1
				Handle hoProperties1
				Get Create (RefClass(cComProperties)) to hoProperties1
				Set pvComObject of hoProperties1 to voProperties1
					Variant vValue
						Get ComtoICalendar "TRUE" OLEexPropertyTypeBoolean to vValue
					Get ComAdd of hoProperties1 "Boolean2" vValue to Nothing
				Send Destroy to hoProperties1
				Variant voProperties2
				Get ComProperties of hoComponent1 to voProperties2
				Handle hoProperties2
				Get Create (RefClass(cComProperties)) to hoProperties2
				Set pvComObject of hoProperties2 to voProperties2
					Variant voProperty
					Get ComAdd of hoProperties2 "Boolean3" Nothing to voProperty
					Handle hoProperty
					Get Create (RefClass(cComProperty)) to hoProperty
					Set pvComObject of hoProperty to voProperty
						Set ComValue of hoProperty to 0
						Set ComType of hoProperty to OLEexPropertyTypeBoolean
					Send Destroy to hoProperty
				Send Destroy to hoProperties2
			Send Destroy to hoComponent1
		Send Destroy to hoComponents
	Send Destroy to hoComponent
	Showln (ComSave(Self))
End_Procedure
10
How can I add a property of binary type

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Variant voComponent
	Get ComContent to voComponent
	Handle hoComponent
	Get Create (RefClass(cComComponent)) to hoComponent
	Set pvComObject of hoComponent to voComponent
		Variant voComponents
		Get ComComponents of hoComponent to voComponents
		Handle hoComponents
		Get Create (RefClass(cComComponents)) to hoComponents
		Set pvComObject of hoComponents to voComponents
			Variant voComponent1
			Get ComAdd of hoComponents "VCALENDAR" to voComponent1
			Handle hoComponent1
			Get Create (RefClass(cComComponent)) to hoComponent1
			Set pvComObject of hoComponent1 to voComponent1
				Variant voProperties
				Get ComProperties of hoComponent1 to voProperties
				Handle hoProperties
				Get Create (RefClass(cComProperties)) to hoProperties
				Set pvComObject of hoProperties to voProperties
					Variant vValue
						Get ComtoICalendar "This is a bit of text converted to binary" OLEexPropertyTypeBinary to vValue
					Get ComAdd of hoProperties "Binary1" vValue to Nothing
				Send Destroy to hoProperties
				Variant voProperties1
				Get ComProperties of hoComponent1 to voProperties1
				Handle hoProperties1
				Get Create (RefClass(cComProperties)) to hoProperties1
				Set pvComObject of hoProperties1 to voProperties1
					Variant voProperty
					Get ComAdd of hoProperties1 "Binary2" Nothing to voProperty
					Handle hoProperty
					Get Create (RefClass(cComProperty)) to hoProperty
					Set pvComObject of hoProperty to voProperty
						Set ComValue of hoProperty to "This is a bit of text converted to binary"
						Set ComType of hoProperty to OLEexPropertyTypeBinary
					Send Destroy to hoProperty
				Send Destroy to hoProperties1
			Send Destroy to hoComponent1
		Send Destroy to hoComponents
	Send Destroy to hoComponent
	Showln (ComSave(Self))
End_Procedure
9
How can I access the root element of the iCalendar format

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Get ComLoad "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nEND:VCALENDAR" to Nothing
	Variant v
	Variant voComponent
	Get ComRoot to voComponent
	Handle hoComponent
	Get Create (RefClass(cComComponent)) to hoComponent
	Set pvComObject of hoComponent to voComponent
		Get ComName of hoComponent to v
	Send Destroy to hoComponent
	Showln v
	Variant v1
	Variant voComponent1
	Get ComRoot to voComponent1
	Handle hoComponent1
	Get Create (RefClass(cComComponent)) to hoComponent1
	Set pvComObject of hoComponent1 to voComponent1
		Variant voProperties
		Get ComProperties of hoComponent1 to voProperties
		Handle hoProperties
		Get Create (RefClass(cComProperties)) to hoProperties
		Set pvComObject of hoProperties to voProperties
			Variant voProperty
			Get ComItem of hoProperties "Version" to voProperty
			Handle hoProperty
			Get Create (RefClass(cComProperty)) to hoProperty
			Set pvComObject of hoProperty to voProperty
				Variant voProperty1
				Get ComItem of hoProperty "Version" to voProperty1
				Handle hoProperty1
				Get Create (RefClass(cComProperty)) to hoProperty1
				Set pvComObject of hoProperty1 to voProperty1
					Get ComValue of hoProperty1 to v1
				Send Destroy to hoProperty1
			Send Destroy to hoProperty
		Send Destroy to hoProperties
	Send Destroy to hoComponent1
	Showln v1
End_Procedure
8
How can I get notified once the control loads a new component, property, when using Load or LoadFile methods

// Occurs when a new component is added.
Procedure OnComAddComponent Variant   llNewComponent
	Forward Send OnComAddComponent llNewComponent
	Showln llNewComponent
End_Procedure

// Occurs when a new property is added.
Procedure OnComAddProperty Variant   llNewPropery
	Forward Send OnComAddProperty llNewPropery
	Showln  llNewPropery
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Set ComFireEvents to True
	Get ComLoad "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nEND:VCALENDAR" to Nothing
End_Procedure
7
How can I add a property with parameters

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Variant voComponent
	Get ComContent to voComponent
	Handle hoComponent
	Get Create (RefClass(cComComponent)) to hoComponent
	Set pvComObject of hoComponent to voComponent
		Variant voComponents
		Get ComComponents of hoComponent to voComponents
		Handle hoComponents
		Get Create (RefClass(cComComponents)) to hoComponents
		Set pvComObject of hoComponents to voComponents
			Variant voComponent1
			Get ComAdd of hoComponents "VCALENDAR" to voComponent1
			Handle hoComponent1
			Get Create (RefClass(cComComponent)) to hoComponent1
			Set pvComObject of hoComponent1 to voComponent1
				Variant voComponents1
				Get ComComponents of hoComponent1 to voComponents1
				Handle hoComponents1
				Get Create (RefClass(cComComponents)) to hoComponents1
				Set pvComObject of hoComponents1 to voComponents1
					Variant voComponent2
					Get ComAdd of hoComponents1 "VEVENT" to voComponent2
					Handle hoComponent2
					Get Create (RefClass(cComComponent)) to hoComponent2
					Set pvComObject of hoComponent2 to voComponent2
						Variant voProperties
						Get ComProperties of hoComponent2 to voProperties
						Handle hoProperties
						Get Create (RefClass(cComProperties)) to hoProperties
						Set pvComObject of hoProperties to voProperties
							Variant voProperty
							Get ComAdd of hoProperties "SUMMARY" "Company Holiday Party" to voProperty
							Handle hoProperty
							Get Create (RefClass(cComProperty)) to hoProperty
							Set pvComObject of hoProperty to voProperty
								Variant voParameters
								Get ComParameters of hoProperty to voParameters
								Handle hoParameters
								Get Create (RefClass(cComParameters)) to hoParameters
								Set pvComObject of hoParameters to voParameters
									Get ComAdd of hoParameters "LANGUAGE" "en-US" to Nothing
								Send Destroy to hoParameters
							Send Destroy to hoProperty
							Get ComAdd of hoProperties "DATE" "1/1/2001" to Nothing
						Send Destroy to hoProperties
					Send Destroy to hoComponent2
				Send Destroy to hoComponents1
			Send Destroy to hoComponent1
		Send Destroy to hoComponents
	Send Destroy to hoComponent
	Showln (ComSave(Self))
End_Procedure
6
How can I load iCalendar from a string

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Get ComLoad "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nEND:VCALENDAR" to Nothing
	Variant v
	Variant voComponent
	Get ComContent to voComponent
	Handle hoComponent
	Get Create (RefClass(cComComponent)) to hoComponent
	Set pvComObject of hoComponent to voComponent
		Variant voComponents
		Get ComComponents of hoComponent to voComponents
		Handle hoComponents
		Get Create (RefClass(cComComponents)) to hoComponents
		Set pvComObject of hoComponents to voComponents
			Variant voComponent1
			Get ComItem of hoComponents 0 to voComponent1
			Handle hoComponent1
			Get Create (RefClass(cComComponent)) to hoComponent1
			Set pvComObject of hoComponent1 to voComponent1
				Variant voComponent2
				Get ComItem of hoComponent1 0 to voComponent2
				Handle hoComponent2
				Get Create (RefClass(cComComponent)) to hoComponent2
				Set pvComObject of hoComponent2 to voComponent2
					Get ComName of hoComponent2 to v
				Send Destroy to hoComponent2
			Send Destroy to hoComponent1
		Send Destroy to hoComponents
	Send Destroy to hoComponent
	Showln v
End_Procedure
5
How can I add VEVENT objects

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Variant voComponent
	Get ComContent to voComponent
	Handle hoComponent
	Get Create (RefClass(cComComponent)) to hoComponent
	Set pvComObject of hoComponent to voComponent
		Variant voComponents
		Get ComComponents of hoComponent to voComponents
		Handle hoComponents
		Get Create (RefClass(cComComponents)) to hoComponents
		Set pvComObject of hoComponents to voComponents
			Variant voComponent1
			Get ComAdd of hoComponents "VCALENDAR" to voComponent1
			Handle hoComponent1
			Get Create (RefClass(cComComponent)) to hoComponent1
			Set pvComObject of hoComponent1 to voComponent1
				Variant voProperties
				Get ComProperties of hoComponent1 to voProperties
				Handle hoProperties
				Get Create (RefClass(cComProperties)) to hoProperties
				Set pvComObject of hoProperties to voProperties
					Get ComAdd of hoProperties "Version" "2.0" to Nothing
					Get ComAdd of hoProperties "PRODID" "-//hacksw/handcal//NONSGML v1.0//EN" to Nothing
				Send Destroy to hoProperties
				Variant voComponents1
				Get ComComponents of hoComponent1 to voComponents1
				Handle hoComponents1
				Get Create (RefClass(cComComponents)) to hoComponents1
				Set pvComObject of hoComponents1 to voComponents1
					Variant voComponent2
					Get ComAdd of hoComponents1 "VEVENT" to voComponent2
					Handle hoComponent2
					Get Create (RefClass(cComComponent)) to hoComponent2
					Set pvComObject of hoComponent2 to voComponent2
						Variant voProperties1
						Get ComProperties of hoComponent2 to voProperties1
						Handle hoProperties1
						Get Create (RefClass(cComProperties)) to hoProperties1
						Set pvComObject of hoProperties1 to voProperties1
							Get ComAdd of hoProperties1 "DTSTART" "1/1/2001" to Nothing
							Get ComAdd of hoProperties1 "DTEND" "1/2/2001" to Nothing
							Get ComAdd of hoProperties1 "SUMMARY" "First Party" to Nothing
						Send Destroy to hoProperties1
					Send Destroy to hoComponent2
				Send Destroy to hoComponents1
				Variant voComponents2
				Get ComComponents of hoComponent1 to voComponents2
				Handle hoComponents2
				Get Create (RefClass(cComComponents)) to hoComponents2
				Set pvComObject of hoComponents2 to voComponents2
					Variant voComponent3
					Get ComAdd of hoComponents2 "VEVENT" to voComponent3
					Handle hoComponent3
					Get Create (RefClass(cComComponent)) to hoComponent3
					Set pvComObject of hoComponent3 to voComponent3
						Variant voProperties2
						Get ComProperties of hoComponent3 to voProperties2
						Handle hoProperties2
						Get Create (RefClass(cComProperties)) to hoProperties2
						Set pvComObject of hoProperties2 to voProperties2
							Get ComAdd of hoProperties2 "DTSTART" "1/4/2001" to Nothing
							Get ComAdd of hoProperties2 "DTEND" "1/5/2001" to Nothing
							Get ComAdd of hoProperties2 "SUMMARY" "Second Party" to Nothing
						Send Destroy to hoProperties2
					Send Destroy to hoComponent3
				Send Destroy to hoComponents2
			Send Destroy to hoComponent1
		Send Destroy to hoComponents
	Send Destroy to hoComponent
	Showln (ComSave(Self))
End_Procedure
4
How can I save the control's content to iCalendar format, as a file
Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Variant voComponent
	Get ComContent to voComponent
	Handle hoComponent
	Get Create (RefClass(cComComponent)) to hoComponent
	Set pvComObject of hoComponent to voComponent
		Variant voComponents
		Get ComComponents of hoComponent to voComponents
		Handle hoComponents
		Get Create (RefClass(cComComponents)) to hoComponents
		Set pvComObject of hoComponents to voComponents
			Variant voComponent1
			Get ComAdd of hoComponents "VCALENDAR" to voComponent1
			Handle hoComponent1
			Get Create (RefClass(cComComponent)) to hoComponent1
			Set pvComObject of hoComponent1 to voComponent1
				Variant voProperties
				Get ComProperties of hoComponent1 to voProperties
				Handle hoProperties
				Get Create (RefClass(cComProperties)) to hoProperties
				Set pvComObject of hoProperties to voProperties
					Get ComAdd of hoProperties "Version" "2.0" to Nothing
					Get ComAdd of hoProperties "PRODID" "-//hacksw/handcal//NONSGML v1.0//EN" to Nothing
				Send Destroy to hoProperties
				Variant voComponents1
				Get ComComponents of hoComponent1 to voComponents1
				Handle hoComponents1
				Get Create (RefClass(cComComponents)) to hoComponents1
				Set pvComObject of hoComponents1 to voComponents1
					Variant voComponent2
					Get ComAdd of hoComponents1 "VEVENT" to voComponent2
					Handle hoComponent2
					Get Create (RefClass(cComComponent)) to hoComponent2
					Set pvComObject of hoComponent2 to voComponent2
						Variant voProperties1
						Get ComProperties of hoComponent2 to voProperties1
						Handle hoProperties1
						Get Create (RefClass(cComProperties)) to hoProperties1
						Set pvComObject of hoProperties1 to voProperties1
							Get ComAdd of hoProperties1 "DTSTART" "1/1/2001" to Nothing
							Get ComAdd of hoProperties1 "DTEND" "1/2/2001" to Nothing
							Get ComAdd of hoProperties1 "SUMMARY" "Bastille Day Party" to Nothing
						Send Destroy to hoProperties1
					Send Destroy to hoComponent2
				Send Destroy to hoComponents1
			Send Destroy to hoComponent1
		Send Destroy to hoComponents
	Send Destroy to hoComponent
	Send ComSaveFile "c:/temp/test.ical"
End_Procedure
3
How can I load the iCalendar format from a file

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Send ComLoadFile "c:/temp/test.ical"
	Variant v
	Variant voComponent
	Get ComContent to voComponent
	Handle hoComponent
	Get Create (RefClass(cComComponent)) to hoComponent
	Set pvComObject of hoComponent to voComponent
		Variant voComponents
		Get ComComponents of hoComponent to voComponents
		Handle hoComponents
		Get Create (RefClass(cComComponents)) to hoComponents
		Set pvComObject of hoComponents to voComponents
			Variant voComponent1
			Get ComItem of hoComponents "VCALENDAR" to voComponent1
			Handle hoComponent1
			Get Create (RefClass(cComComponent)) to hoComponent1
			Set pvComObject of hoComponent1 to voComponent1
				Variant voComponent2
				Get ComItem of hoComponent1 "VCALENDAR" to voComponent2
				Handle hoComponent2
				Get Create (RefClass(cComComponent)) to hoComponent2
				Set pvComObject of hoComponent2 to voComponent2
					Variant voProperties
					Get ComProperties of hoComponent2 to voProperties
					Handle hoProperties
					Get Create (RefClass(cComProperties)) to hoProperties
					Set pvComObject of hoProperties to voProperties
						Variant voProperty
						Get ComItem of hoProperties "PRODID" to voProperty
						Handle hoProperty
						Get Create (RefClass(cComProperty)) to hoProperty
						Set pvComObject of hoProperty to voProperty
							Variant voProperty1
							Get ComItem of hoProperty "PRODID" to voProperty1
							Handle hoProperty1
							Get Create (RefClass(cComProperty)) to hoProperty1
							Set pvComObject of hoProperty1 to voProperty1
								Get ComValue of hoProperty1 to v
							Send Destroy to hoProperty1
						Send Destroy to hoProperty
					Send Destroy to hoProperties
				Send Destroy to hoComponent2
			Send Destroy to hoComponent1
		Send Destroy to hoComponents
	Send Destroy to hoComponent
	Showln v
End_Procedure
2
How do I export the control's content to iCalendar format

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Variant voComponent
	Get ComContent to voComponent
	Handle hoComponent
	Get Create (RefClass(cComComponent)) to hoComponent
	Set pvComObject of hoComponent to voComponent
		Variant voComponents
		Get ComComponents of hoComponent to voComponents
		Handle hoComponents
		Get Create (RefClass(cComComponents)) to hoComponents
		Set pvComObject of hoComponents to voComponents
			Variant voComponent1
			Get ComAdd of hoComponents "VCALENDAR" to voComponent1
			Handle hoComponent1
			Get Create (RefClass(cComComponent)) to hoComponent1
			Set pvComObject of hoComponent1 to voComponent1
				Variant voProperties
				Get ComProperties of hoComponent1 to voProperties
				Handle hoProperties
				Get Create (RefClass(cComProperties)) to hoProperties
				Set pvComObject of hoProperties to voProperties
					Get ComAdd of hoProperties "Version" "2.0" to Nothing
					Get ComAdd of hoProperties "PRODID" "-//hacksw/handcal//NONSGML v1.0//EN" to Nothing
				Send Destroy to hoProperties
				Variant voComponents1
				Get ComComponents of hoComponent1 to voComponents1
				Handle hoComponents1
				Get Create (RefClass(cComComponents)) to hoComponents1
				Set pvComObject of hoComponents1 to voComponents1
					Variant voComponent2
					Get ComAdd of hoComponents1 "VEVENT" to voComponent2
					Handle hoComponent2
					Get Create (RefClass(cComComponent)) to hoComponent2
					Set pvComObject of hoComponent2 to voComponent2
						Variant voProperties1
						Get ComProperties of hoComponent2 to voProperties1
						Handle hoProperties1
						Get Create (RefClass(cComProperties)) to hoProperties1
						Set pvComObject of hoProperties1 to voProperties1
							Get ComAdd of hoProperties1 "DTSTART" "1/1/2001" to Nothing
							Get ComAdd of hoProperties1 "DTEND" "1/2/2001" to Nothing
							Get ComAdd of hoProperties1 "SUMMARY" "Bastille Day Party" to Nothing
						Send Destroy to hoProperties1
					Send Destroy to hoComponent2
				Send Destroy to hoComponents1
			Send Destroy to hoComponent1
		Send Destroy to hoComponents
	Send Destroy to hoComponent
	Showln (ComSave(Self))
End_Procedure
1
How can I generate a VCALENDAR object

Procedure OnCreate
	Forward Send OnCreate
	Variant oComICalendar1
	Get ComCreateObject "Exontrol.ICalendar.1" to oComICalendar1

	Variant voComponent
	Get ComContent to voComponent
	Handle hoComponent
	Get Create (RefClass(cComComponent)) to hoComponent
	Set pvComObject of hoComponent to voComponent
		Variant voComponents
		Get ComComponents of hoComponent to voComponents
		Handle hoComponents
		Get Create (RefClass(cComComponents)) to hoComponents
		Set pvComObject of hoComponents to voComponents
			Variant voComponent1
			Get ComAdd of hoComponents "VCALENDAR" to voComponent1
			Handle hoComponent1
			Get Create (RefClass(cComComponent)) to hoComponent1
			Set pvComObject of hoComponent1 to voComponent1
				Variant voProperties
				Get ComProperties of hoComponent1 to voProperties
				Handle hoProperties
				Get Create (RefClass(cComProperties)) to hoProperties
				Set pvComObject of hoProperties to voProperties
					Get ComAdd of hoProperties "Version" "2.0" to Nothing
					Get ComAdd of hoProperties "PRODID" "-//hacksw/handcal//NONSGML v1.0//EN" to Nothing
				Send Destroy to hoProperties
			Send Destroy to hoComponent1
		Send Destroy to hoComponents
	Send Destroy to hoComponent
	Showln (ComSave(Self))
End_Procedure