property Property.GuessType as PropertyTypeEnum
Guesses the property's type, from its value

TypeDescription
PropertyTypeEnum A PropertyTypeEnum expression that specifies the type of the property, by getting it from Value property
The GuessType property guesses the property's type, from its value. The Value property specifies the value of the property. The Type property specifies the type of the property from the Value parameter of the property. The Name property specifies the name of the property. The valuesFromICalendar property extracts all values or specified value of the giving value/type in ICalendar format. The toICalendar property converts the giving value to a specified type.

The following samples show how Type and GuessType properties get the type of the Duration1 and Duration2 property . 

In the following iCalendar format the Duration2 has a Value parameter that determines the type of the property, while the Duration1 has no Value parameter:

BEGIN:VCALENDAR
Duration1:P2DT12H
Duration2;VALUE=DURATION:P2DT12H
END:VCALENDAR

If running any of the following samples, you should get an output like:

Duration1 Guess 6
Duration1 Type 0
Duration2 Guess 6
Duration2 Type 6  

VBA (MS Access, Excell...)

Set ICalendar1 = CreateObject("Exontrol.ICalendar.1")
With ICalendar1
	With .Content.Components.Add("VCALENDAR")
		.Properties.Add "Duration1",ICalendar1.toICalendar(2.5,6)
		With .Properties.Add("Duration2")
			.Value = 2.5
			.Type = 6
		End With
	End With
	With .Root.Properties.Item("Duration1")
		Debug.Print( .Name )
		Debug.Print( "Guess" )
		Debug.Print( .GuessType )
		Debug.Print( .Name )
		Debug.Print( "Type" )
		Debug.Print( .Type )
	End With
	With .Root.Properties.Item("Duration2")
		Debug.Print( .Name )
		Debug.Print( "Guess" )
		Debug.Print( .GuessType )
		Debug.Print( .Name )
		Debug.Print( "Type" )
		Debug.Print( .Type )
	End With
End With

VB6

Set ICalendar1 = CreateObject("Exontrol.ICalendar.1")
With ICalendar1
	With .Content.Components.Add("VCALENDAR")
		.Properties.Add "Duration1",ICalendar1.toICalendar(2.5,exPropertyTypeDuration)
		With .Properties.Add("Duration2")
			.Value = 2.5
			.Type = exPropertyTypeDuration
		End With
	End With
	With .Root.Properties.Item("Duration1")
		Debug.Print( .Name )
		Debug.Print( "Guess" )
		Debug.Print( .GuessType )
		Debug.Print( .Name )
		Debug.Print( "Type" )
		Debug.Print( .Type )
	End With
	With .Root.Properties.Item("Duration2")
		Debug.Print( .Name )
		Debug.Print( "Guess" )
		Debug.Print( .GuessType )
		Debug.Print( .Name )
		Debug.Print( "Type" )
		Debug.Print( .Type )
	End With
End With

VB.NET

' Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
Exicalendar1 = New exontrol.EXICALENDARLib.exicalendar()
With Exicalendar1
	With .Content.Components.Add("VCALENDAR")
		.Properties.Add("Duration1",Exicalendar1.get_toICalendar(2.5,exontrol.EXICALENDARLib.PropertyTypeEnum.exPropertyTypeDuration))
		With .Properties.Add("Duration2")
			.Value = 2.5
			.Type = exontrol.EXICALENDARLib.PropertyTypeEnum.exPropertyTypeDuration
		End With
	End With
	With .Root.Properties.Item("Duration1")
		Debug.Print( .Name )
		Debug.Print( "Guess" )
		Debug.Print( .GuessType )
		Debug.Print( .Name )
		Debug.Print( "Type" )
		Debug.Print( .Type )
	End With
	With .Root.Properties.Item("Duration2")
		Debug.Print( .Name )
		Debug.Print( "Guess" )
		Debug.Print( .GuessType )
		Debug.Print( .Name )
		Debug.Print( "Type" )
		Debug.Print( .Type )
	End With
End With

VB.NET for /COM

AxICalendar1 = CreateObject("Exontrol.ICalendar.1")
With AxICalendar1
	With .Content.Components.Add("VCALENDAR")
		.Properties.Add("Duration1",AxICalendar1.toICalendar(2.5,EXICALENDARLib.PropertyTypeEnum.exPropertyTypeDuration))
		With .Properties.Add("Duration2")
			.Value = 2.5
			.Type = EXICALENDARLib.PropertyTypeEnum.exPropertyTypeDuration
		End With
	End With
	With .Root.Properties.Item("Duration1")
		Debug.Print( .Name )
		Debug.Print( "Guess" )
		Debug.Print( .GuessType )
		Debug.Print( .Name )
		Debug.Print( "Type" )
		Debug.Print( .Type )
	End With
	With .Root.Properties.Item("Duration2")
		Debug.Print( .Name )
		Debug.Print( "Guess" )
		Debug.Print( .GuessType )
		Debug.Print( .Name )
		Debug.Print( "Type" )
		Debug.Print( .Type )
	End With
End With

C++

/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXICALENDARLib' for the library: 'ICalendar 1.0 Type Library'

	#import <ExICalendar.dll>
	using namespace EXICALENDARLib;
*/
EXICALENDARLib::IICalendarPtr spICalendar1 = ::CreateObject(L"Exontrol.ICalendar.1");
EXICALENDARLib::IComponentPtr var_Component = spICalendar1->GetContent()->GetComponents()->Add(L"VCALENDAR");
	var_Component->GetProperties()->Add(L"Duration1",spICalendar1->GettoICalendar(double(2.5),EXICALENDARLib::exPropertyTypeDuration));
	EXICALENDARLib::IPropertyPtr var_Property = var_Component->GetProperties()->Add(L"Duration2",vtMissing);
		var_Property->PutValue(double(2.5));
		var_Property->PutType(EXICALENDARLib::exPropertyTypeDuration);
EXICALENDARLib::IPropertyPtr var_Property1 = spICalendar1->GetRoot()->GetProperties()->GetItem("Duration1");
	OutputDebugStringW( var_Property1->GetName() );
	OutputDebugStringW( L"Guess" );
	OutputDebugStringW( _bstr_t(var_Property1->GetGuessType()) );
	OutputDebugStringW( var_Property1->GetName() );
	OutputDebugStringW( L"Type" );
	OutputDebugStringW( _bstr_t(var_Property1->GetType()) );
EXICALENDARLib::IPropertyPtr var_Property2 = spICalendar1->GetRoot()->GetProperties()->GetItem("Duration2");
	OutputDebugStringW( var_Property2->GetName() );
	OutputDebugStringW( L"Guess" );
	OutputDebugStringW( _bstr_t(var_Property2->GetGuessType()) );
	OutputDebugStringW( var_Property2->GetName() );
	OutputDebugStringW( L"Type" );
	OutputDebugStringW( _bstr_t(var_Property2->GetType()) );

C++ Builder

Exicalendarlib_tlb::IICalendarPtr ICalendar1 = Variant::CreateObject(L"Exontrol.ICalendar.1");
Exicalendarlib_tlb::IComponentPtr var_Component = ICalendar1->Content->Components->Add(L"VCALENDAR");
	var_Component->Properties->Add(L"Duration1",TVariant(ICalendar1->get_toICalendar(TVariant(2.5),Exicalendarlib_tlb::PropertyTypeEnum::exPropertyTypeDuration)));
	Exicalendarlib_tlb::IPropertyPtr var_Property = var_Component->Properties->Add(L"Duration2",TNoParam());
		var_Property->set_Value(TVariant(2.5));
		var_Property->Type = Exicalendarlib_tlb::PropertyTypeEnum::exPropertyTypeDuration;
Exicalendarlib_tlb::IPropertyPtr var_Property1 = ICalendar1->Root->Properties->get_Item(TVariant("Duration1"));
	OutputDebugString( var_Property1->Name );
	OutputDebugString( L"Guess" );
	OutputDebugString( PChar(var_Property1->GuessType) );
	OutputDebugString( var_Property1->Name );
	OutputDebugString( L"Type" );
	OutputDebugString( PChar(var_Property1->Type) );
Exicalendarlib_tlb::IPropertyPtr var_Property2 = ICalendar1->Root->Properties->get_Item(TVariant("Duration2"));
	OutputDebugString( var_Property2->Name );
	OutputDebugString( L"Guess" );
	OutputDebugString( PChar(var_Property2->GuessType) );
	OutputDebugString( var_Property2->Name );
	OutputDebugString( L"Type" );
	OutputDebugString( PChar(var_Property2->Type) );

C#

// Add 'exontrol.exicalendar.dll(ExICalendar.dll)' reference to your project.
exontrol.EXICALENDARLib.exicalendar exicalendar1 = new exontrol.EXICALENDARLib.exicalendar();
exontrol.EXICALENDARLib.Component var_Component = exicalendar1.Content.Components.Add("VCALENDAR");
	var_Component.Properties.Add("Duration1",exicalendar1.get_toICalendar(2.5,exontrol.EXICALENDARLib.PropertyTypeEnum.exPropertyTypeDuration));
	exontrol.EXICALENDARLib.Property var_Property = var_Component.Properties.Add("Duration2",null);
		var_Property.Value = 2.5;
		var_Property.Type = exontrol.EXICALENDARLib.PropertyTypeEnum.exPropertyTypeDuration;
exontrol.EXICALENDARLib.Property var_Property1 = exicalendar1.Root.Properties["Duration1"];
	System.Diagnostics.Debug.Print( var_Property1.Name );
	System.Diagnostics.Debug.Print( "Guess" );
	System.Diagnostics.Debug.Print( var_Property1.GuessType.ToString() );
	System.Diagnostics.Debug.Print( var_Property1.Name );
	System.Diagnostics.Debug.Print( "Type" );
	System.Diagnostics.Debug.Print( var_Property1.Type.ToString() );
exontrol.EXICALENDARLib.Property var_Property2 = exicalendar1.Root.Properties["Duration2"];
	System.Diagnostics.Debug.Print( var_Property2.Name );
	System.Diagnostics.Debug.Print( "Guess" );
	System.Diagnostics.Debug.Print( var_Property2.GuessType.ToString() );
	System.Diagnostics.Debug.Print( var_Property2.Name );
	System.Diagnostics.Debug.Print( "Type" );
	System.Diagnostics.Debug.Print( var_Property2.Type.ToString() );

JScript/JavaScript

<BODY onload="Init()">
<OBJECT CLASSID="clsid:D6C87100-38E2-4ABB-8AC2-4C0097AEE2D6" id="ICalendar1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	var var_Component = ICalendar1.Content.Components.Add("VCALENDAR");
		var_Component.Properties.Add("Duration1",ICalendar1.toICalendar(2.5,6));
		var var_Property = var_Component.Properties.Add("Duration2",null);
			var_Property.Value = 2.5;
			var_Property.Type = 6;
	var var_Property1 = ICalendar1.Root.Properties.Item("Duration1");
		alert( var_Property1.Name );
		alert( "Guess" );
		alert( var_Property1.GuessType );
		alert( var_Property1.Name );
		alert( "Type" );
		alert( var_Property1.Type );
	var var_Property2 = ICalendar1.Root.Properties.Item("Duration2");
		alert( var_Property2.Name );
		alert( "Guess" );
		alert( var_Property2.GuessType );
		alert( var_Property2.Name );
		alert( "Type" );
		alert( var_Property2.Type );
}
</SCRIPT>
</BODY>

VBScript

<BODY onload="Init()">
<OBJECT CLASSID="clsid:D6C87100-38E2-4ABB-8AC2-4C0097AEE2D6" id="ICalendar1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With ICalendar1
		With .Content.Components.Add("VCALENDAR")
			.Properties.Add "Duration1",ICalendar1.toICalendar(2.5,6)
			With .Properties.Add("Duration2")
				.Value = 2.5
				.Type = 6
			End With
		End With
		With .Root.Properties.Item("Duration1")
			alert( .Name )
			alert( "Guess" )
			alert( .GuessType )
			alert( .Name )
			alert( "Type" )
			alert( .Type )
		End With
		With .Root.Properties.Item("Duration2")
			alert( .Name )
			alert( "Guess" )
			alert( .GuessType )
			alert( .Name )
			alert( "Type" )
			alert( .Type )
		End With
	End With
End Function
</SCRIPT>
</BODY>

C# for /COM

EXICALENDARLib.ICalendar axICalendar1 = new EXICALENDARLib.ICalendar();
EXICALENDARLib.Component var_Component = axICalendar1.Content.Components.Add("VCALENDAR");
	var_Component.Properties.Add("Duration1",axICalendar1.get_toICalendar(2.5,EXICALENDARLib.PropertyTypeEnum.exPropertyTypeDuration));
	EXICALENDARLib.Property var_Property = var_Component.Properties.Add("Duration2",null);
		var_Property.Value = 2.5;
		var_Property.Type = EXICALENDARLib.PropertyTypeEnum.exPropertyTypeDuration;
EXICALENDARLib.Property var_Property1 = axICalendar1.Root.Properties["Duration1"];
	System.Diagnostics.Debug.Print( var_Property1.Name );
	System.Diagnostics.Debug.Print( "Guess" );
	System.Diagnostics.Debug.Print( var_Property1.GuessType.ToString() );
	System.Diagnostics.Debug.Print( var_Property1.Name );
	System.Diagnostics.Debug.Print( "Type" );
	System.Diagnostics.Debug.Print( var_Property1.Type.ToString() );
EXICALENDARLib.Property var_Property2 = axICalendar1.Root.Properties["Duration2"];
	System.Diagnostics.Debug.Print( var_Property2.Name );
	System.Diagnostics.Debug.Print( "Guess" );
	System.Diagnostics.Debug.Print( var_Property2.GuessType.ToString() );
	System.Diagnostics.Debug.Print( var_Property2.Name );
	System.Diagnostics.Debug.Print( "Type" );
	System.Diagnostics.Debug.Print( var_Property2.Type.ToString() );

X++ (Dynamics Ax 2009)

public void init()
{
	COM com_Component,com_Properties,com_Property,com_Property1,com_Property2,com_exicalendar1;
	anytype exicalendar1,var_Component,var_Properties,var_Property,var_Property1,var_Property2;
	;

	super();

	// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
	exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
	var_Component = COM::createFromObject(com_exicalendar1.Content().Components()).Add("VCALENDAR"); com_Component = var_Component;
		var_Properties = COM::createFromObject(com_Component.Properties()); com_Properties = var_Properties;
		com_Properties.Add("Duration1",COMVariant::createFromStr(com_exicalendar1.toICalendar(COMVariant::createFromReal(2.5),6/*exPropertyTypeDuration*/)));
		var_Properties = COM::createFromObject(com_Component.Properties()); com_Properties = var_Properties;
		var_Property = COM::createFromObject(com_Properties).Add("Duration2"); com_Property = var_Property;
			com_Property.Value(COMVariant::createFromReal(2.5));
			com_Property.Type(6/*exPropertyTypeDuration*/);
	var_Property1 = COM::createFromObject(com_exicalendar1.Root().Properties()).Item("Duration1"); com_Property1 = var_Property1;
		print( com_Property1.Name() );
		print( "Guess" );
		print( com_Property1.GuessType() );
		print( com_Property1.Name() );
		print( "Type" );
		print( com_Property1.Type() );
	var_Property2 = COM::createFromObject(com_exicalendar1.Root().Properties()).Item("Duration2"); com_Property2 = var_Property2;
		print( com_Property2.Name() );
		print( "Guess" );
		print( com_Property2.GuessType() );
		print( com_Property2.Name() );
		print( "Type" );
		print( com_Property2.Type() );
}

Delphi 8 (.NET only)

AxICalendar1 := (ComObj.CreateComObject(ComObj.ProgIDToClassID('Exontrol.ICalendar.1')) as EXICALENDARLib.ICalendar);
with AxICalendar1 do
begin
	with Content.Components.Add('VCALENDAR') do
	begin
		Properties.Add('Duration1',TObject(AxICalendar1.toICalendar[TObject(2.5),EXICALENDARLib.PropertyTypeEnum.exPropertyTypeDuration]));
		with Properties.Add('Duration2',Nil) do
		begin
			Value := TObject(2.5);
			Type := EXICALENDARLib.PropertyTypeEnum.exPropertyTypeDuration;
		end;
	end;
	with Root.Properties.Item['Duration1'] do
	begin
		OutputDebugString( Name );
		OutputDebugString( 'Guess' );
		OutputDebugString( GuessType );
		OutputDebugString( Name );
		OutputDebugString( 'Type' );
		OutputDebugString( Type );
	end;
	with Root.Properties.Item['Duration2'] do
	begin
		OutputDebugString( Name );
		OutputDebugString( 'Guess' );
		OutputDebugString( GuessType );
		OutputDebugString( Name );
		OutputDebugString( 'Type' );
		OutputDebugString( Type );
	end;
end

Delphi (standard)

ICalendar1 := (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('Exontrol.ICalendar.1'))) as EXICALENDARLib_TLB.ICalendar);
with ICalendar1 do
begin
	with Content.Components.Add('VCALENDAR') do
	begin
		Properties.Add('Duration1',OleVariant(ICalendar1.toICalendar[OleVariant(2.5),EXICALENDARLib_TLB.exPropertyTypeDuration]));
		with Properties.Add('Duration2',Null) do
		begin
			Value := OleVariant(2.5);
			Type := EXICALENDARLib_TLB.exPropertyTypeDuration;
		end;
	end;
	with Root.Properties.Item['Duration1'] do
	begin
		OutputDebugString( Name );
		OutputDebugString( 'Guess' );
		OutputDebugString( GuessType );
		OutputDebugString( Name );
		OutputDebugString( 'Type' );
		OutputDebugString( Type );
	end;
	with Root.Properties.Item['Duration2'] do
	begin
		OutputDebugString( Name );
		OutputDebugString( 'Guess' );
		OutputDebugString( GuessType );
		OutputDebugString( Name );
		OutputDebugString( 'Type' );
		OutputDebugString( Type );
	end;
end

VFP

thisform.ICalendar1 = CreateObject("Exontrol.ICalendar.1")
with thisform.ICalendar1
	with .Content.Components.Add("VCALENDAR")
		.Properties.Add("Duration1",thisform.ICalendar1.toICalendar(2.5,6))
		with .Properties.Add("Duration2")
			.Value = 2.5
			.Type = 6
		endwith
	endwith
	with .Root.Properties.Item("Duration1")
		DEBUGOUT( .Name )
		DEBUGOUT( "Guess" )
		DEBUGOUT( .GuessType )
		DEBUGOUT( .Name )
		DEBUGOUT( "Type" )
		DEBUGOUT( .Type )
	endwith
	with .Root.Properties.Item("Duration2")
		DEBUGOUT( .Name )
		DEBUGOUT( "Guess" )
		DEBUGOUT( .GuessType )
		DEBUGOUT( .Name )
		DEBUGOUT( "Type" )
		DEBUGOUT( .Type )
	endwith
endwith

dBASE Plus

local oICalendar,var_Component,var_Property,var_Property1,var_Property2

oICalendar = new OleAutoClient("Exontrol.ICalendar.1")

var_Component = oICalendar.Content.Components.Add("VCALENDAR")
	var_Component.Properties.Add("Duration1",oICalendar.toICalendar(2.5,6))
	var_Property = var_Component.Properties.Add("Duration2")
		var_Property.Value = 2.5
		var_Property.Type = 6
var_Property1 = oICalendar.Root.Properties.Item("Duration1")
	? var_Property1.Name 
	? "Guess" 
	? Str(var_Property1.GuessType) 
	? var_Property1.Name 
	? "Type" 
	? Str(var_Property1.Type) 
var_Property2 = oICalendar.Root.Properties.Item("Duration2")
	? var_Property2.Name 
	? "Guess" 
	? Str(var_Property2.GuessType) 
	? var_Property2.Name 
	? "Type" 
	? Str(var_Property2.Type) 

XBasic (Alpha Five)

Dim oICalendar as P
Dim var_Component as P
Dim var_Property as P
Dim var_Property1 as P
Dim var_Property2 as P

oICalendar = OLE.Create("Exontrol.ICalendar.1")

var_Component = oICalendar.Content.Components.Add("VCALENDAR")
	var_Component.Properties.Add("Duration1",oICalendar.toICalendar(2.5,6))
	var_Property = var_Component.Properties.Add("Duration2")
		var_Property.Value = 2.5
		var_Property.Type = 6
var_Property1 = oICalendar.Root.Properties.Item("Duration1")
	? var_Property1.Name 
	? "Guess" 
	? var_Property1.GuessType 
	? var_Property1.Name 
	? "Type" 
	? var_Property1.Type 
var_Property2 = oICalendar.Root.Properties.Item("Duration2")
	? var_Property2.Name 
	? "Guess" 
	? var_Property2.GuessType 
	? var_Property2.Name 
	? "Type" 
	? var_Property2.Type 

Visual Objects

local var_Component as IComponent
local var_Property,var_Property1,var_Property2 as IProperty

oDCOCX_Exontrol1 := IICalendar{"Exontrol.ICalendar.1"}
var_Component := oDCOCX_Exontrol1:Content:Components:Add("VCALENDAR")
	var_Component:Properties:Add("Duration1",oDCOCX_Exontrol1:[toICalendar,2.5,exPropertyTypeDuration])
	var_Property := var_Component:Properties:Add("Duration2",nil)
		var_Property:Value := 2.5
		var_Property:Type := exPropertyTypeDuration
var_Property1 := oDCOCX_Exontrol1:Root:Properties:[Item,"Duration1"]
	OutputDebugString(String2Psz( var_Property1:Name ))
	OutputDebugString(String2Psz( "Guess" ))
	OutputDebugString(String2Psz( AsString(var_Property1:GuessType) ))
	OutputDebugString(String2Psz( var_Property1:Name ))
	OutputDebugString(String2Psz( "Type" ))
	OutputDebugString(String2Psz( AsString(var_Property1:Type) ))
var_Property2 := oDCOCX_Exontrol1:Root:Properties:[Item,"Duration2"]
	OutputDebugString(String2Psz( var_Property2:Name ))
	OutputDebugString(String2Psz( "Guess" ))
	OutputDebugString(String2Psz( AsString(var_Property2:GuessType) ))
	OutputDebugString(String2Psz( var_Property2:Name ))
	OutputDebugString(String2Psz( "Type" ))
	OutputDebugString(String2Psz( AsString(var_Property2:Type) ))

PowerBuilder

OleObject oICalendar,var_Component,var_Property,var_Property1,var_Property2

oICalendar = CREATE OLEObject
oICalendar.ConnectToNewObject("Exontrol.ICalendar.1")

var_Component = oICalendar.Content.Components.Add("VCALENDAR")
	var_Component.Properties.Add("Duration1",oICalendar.toICalendar(2.5,6))
	var_Property = var_Component.Properties.Add("Duration2")
		var_Property.Value = 2.5
		var_Property.Type = 6
var_Property1 = oICalendar.Root.Properties.Item("Duration1")
	MessageBox("Information",string( var_Property1.Name ))
	MessageBox("Information",string( "Guess" ))
	MessageBox("Information",string( String(var_Property1.GuessType) ))
	MessageBox("Information",string( var_Property1.Name ))
	MessageBox("Information",string( "Type" ))
	MessageBox("Information",string( String(var_Property1.Type) ))
var_Property2 = oICalendar.Root.Properties.Item("Duration2")
	MessageBox("Information",string( var_Property2.Name ))
	MessageBox("Information",string( "Guess" ))
	MessageBox("Information",string( String(var_Property2.GuessType) ))
	MessageBox("Information",string( var_Property2.Name ))
	MessageBox("Information",string( "Type" ))
	MessageBox("Information",string( String(var_Property2.Type) ))

Visual DataFlex

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

XBase++

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oICalendar
	LOCAL oComponent
	LOCAL oProperty,oProperty1,oProperty2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oICalendar := XbpActiveXControl():new( oForm:drawingArea )
	oICalendar:CLSID  := "Exontrol.ICalendar.1" /*{D6C87100-38E2-4ABB-8AC2-4C0097AEE2D6}*/
	oICalendar:create(,, {10,60},{610,370} )

		oComponent := oICalendar:Content():Components():Add("VCALENDAR")
			oComponent:Properties():Add("Duration1",oICalendar:toICalendar(2.5,6/*exPropertyTypeDuration*/))
			oProperty := oComponent:Properties():Add("Duration2")
				oProperty:Value := 2.5
				oProperty:Type := 6/*exPropertyTypeDuration*/
		oProperty1 := oICalendar:Root():Properties:Item("Duration1")
			DevOut( oProperty1:Name() )
			DevOut( "Guess" )
			DevOut( Transform(oProperty1:GuessType(),"") )
			DevOut( oProperty1:Name() )
			DevOut( "Type" )
			DevOut( Transform(oProperty1:Type(),"") )
		oProperty2 := oICalendar:Root():Properties:Item("Duration2")
			DevOut( oProperty2:Name() )
			DevOut( "Guess" )
			DevOut( Transform(oProperty2:GuessType(),"") )
			DevOut( oProperty2:Name() )
			DevOut( "Type" )
			DevOut( Transform(oProperty2:Type(),"") )

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN