method ExPictures.Add (Key as String, Picture as Variant)
Adds a Picture object to the collection and returns a reference to the newly created object.

TypeDescription
Key as String A String expression that indicates the key of the image to be added. If Key and Picture parameters are both empty, the Pictures collection is cleared.
Picture as Variant The Picture expression can be one of the followings: 
  • a long expression that specifies the index of the icon to be displayed instead. The Images method loads icons to the control
  • a string expression that indicates the path to the picture file, being loaded, BMP, JPG, PNG, GIF and so on/
  • a string expression that indicates the base64 encoded string that holds a picture object, Use the eximages tool to save your picture as base64 encoded format. 
  • A Picture object that indicates the picture being added or replaced. ( A Picture object implements IPicture interface ), 

If empty, the picture being associated to a key is removed. If the key already exists the new picture is replaced. If the key is not empty, and it doesn't not exist no picture is added.

ReturnDescription
ExPictureAn ExPicture object being created, that holds the picture being loaded.

The Images method loads icons to the control, HTMLPicture assigns a key to a picture object, and the Pictures collection handles the identifiers of the pictures that can be used in the Pictures or ExtraPictures properties.

In order to display an icon or a picture in the control you need first to load the icons or the pictures you plan to display, using the Images method, HTMLPicture, or Add method of the ExPictures collection. The Images collection can display only 16x16 icons, while the HTMLPicture, or Add method can load and display custom sized pictures. The Width/Height  property specifies the width and height of the picture to be displayed in the event's body.

The event can display icons, pictures several ways as follows:

The Pictures and ExtraPictures may display one or more pictures at the time. The , character indicates the separator of pictures in the same line, while the / character divides the lines to show the pictures. For instance, "1,2" displays icon with the index 1 and 2 on the same line, while the "1/2,pic1" displays the first icon on the first line, the second icon and the picture pic1 on the second line.

The following samples displays a picture on the event's body: 

VBA (MS Access, Excell...)

With Schedule1
	.Calendar.Selection = #5/24/2012#
	.Pictures.Add "pic1","c:\exontrol\images\zipdisk.gif"
	.Events.Add(#5/24/2012 9:00:00 AM#,#5/24/2012 2:00:00 PM#).Pictures = "pic1"
End With

VB6

With Schedule1
	.Calendar.Selection = #5/24/2012#
	.Pictures.Add "pic1","c:\exontrol\images\zipdisk.gif"
	.Events.Add(#5/24/2012 9:00:00 AM#,#5/24/2012 2:00:00 PM#).Pictures = "pic1"
End With

VB.NET

With Exschedule1
	.Calendar.Selection = #5/24/2012#
	.Pictures.Add("pic1","c:\exontrol\images\zipdisk.gif")
	.Events.Add(#5/24/2012 9:00:00 AM#,#5/24/2012 2:00:00 PM#).Pictures = "pic1"
End With

VB.NET for /COM

With AxSchedule1
	.Calendar.Selection = #5/24/2012#
	.Pictures.Add("pic1","c:\exontrol\images\zipdisk.gif")
	.Events.Add(#5/24/2012 9:00:00 AM#,#5/24/2012 2:00:00 PM#).Pictures = "pic1"
End With

C++

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXSCHEDULELib' for the library: 'ExSchedule 1.0 Control Library'

	#import <ExSchedule.dll>
	using namespace EXSCHEDULELib;
*/
EXSCHEDULELib::ISchedulePtr spSchedule1 = GetDlgItem(IDC_SCHEDULE1)->GetControlUnknown();
spSchedule1->GetCalendar()->PutSelection("5/24/2012");
spSchedule1->GetPictures()->Add(L"pic1","c:\\exontrol\\images\\zipdisk.gif");
spSchedule1->GetEvents()->Add("5/24/2012 9:00:00 AM","5/24/2012 2:00:00 PM")->PutPictures(L"pic1");

C++ Builder

Schedule1->Calendar->set_Selection(TVariant(TDateTime(2012,5,24).operator double()));
Schedule1->Pictures->Add(L"pic1",TVariant("c:\\exontrol\\images\\zipdisk.gif"));
Schedule1->Events->Add(TVariant(TDateTime(2012,5,24,9,00,00,0).operator double()),TVariant(TDateTime(2012,5,24,14,00,00,0).operator double()))->Pictures = L"pic1";

C#

exschedule1.Calendar.Selection = Convert.ToDateTime("5/24/2012",System.Globalization.CultureInfo.GetCultureInfo("en-US"));
exschedule1.Pictures.Add("pic1","c:\\exontrol\\images\\zipdisk.gif");
exschedule1.Events.Add(Convert.ToDateTime("5/24/2012 9:00:00 AM",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("5/24/2012 2:00:00 PM",System.Globalization.CultureInfo.GetCultureInfo("en-US"))).Pictures = "pic1";

JavaScript

<OBJECT classid="clsid:9B09E13D-7A88-4299-9DBE-383380435377" id="Schedule1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
	Schedule1.Calendar.Selection = "5/24/2012";
	Schedule1.Pictures.Add("pic1","c:\\exontrol\\images\\zipdisk.gif");
	Schedule1.Events.Add("5/24/2012 9:00:00 AM","5/24/2012 2:00:00 PM").Pictures = "pic1";
</SCRIPT>

C# for /COM

axSchedule1.Calendar.Selection = Convert.ToDateTime("5/24/2012",System.Globalization.CultureInfo.GetCultureInfo("en-US"));
axSchedule1.Pictures.Add("pic1","c:\\exontrol\\images\\zipdisk.gif");
axSchedule1.Events.Add(Convert.ToDateTime("5/24/2012 9:00:00 AM",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("5/24/2012 2:00:00 PM",System.Globalization.CultureInfo.GetCultureInfo("en-US"))).Pictures = "pic1";

X++ (Dynamics Ax 2009)

public void init()
{
	COM com_Event;
	anytype var_Event;
	;

	super();

	exschedule1.Calendar().Selection(COMVariant::createFromDate(str2Date("5/24/2012",213)));
	exschedule1.Pictures().Add("pic1","c:\\exontrol\\images\\zipdisk.gif");
	var_Event = COM::createFromObject(exschedule1.Events()).Add(COMVariant::createFromUtcDateTime(str2Datetime("5/24/2012 9:00:00",213)),COMVariant::createFromUtcDateTime(str2Datetime("5/24/2012 14:00:00",213))); com_Event = var_Event;
	com_Event.Pictures("pic1");
}

Delphi 8 (.NET only)

with AxSchedule1 do
begin
	Calendar.Selection := '5/24/2012';
	Pictures.Add('pic1','c:\exontrol\images\zipdisk.gif');
	Events.Add('5/24/2012 9:00:00 AM','5/24/2012 2:00:00 PM').Pictures := 'pic1';
end

Delphi (standard)

with Schedule1 do
begin
	Calendar.Selection := '5/24/2012';
	Pictures.Add('pic1','c:\exontrol\images\zipdisk.gif');
	Events.Add('5/24/2012 9:00:00 AM','5/24/2012 2:00:00 PM').Pictures := 'pic1';
end

VFP

with thisform.Schedule1
	.Calendar.Selection = {^2012-5-24}
	.Pictures.Add("pic1","c:\exontrol\images\zipdisk.gif")
	.Events.Add({^2012-5-24 9:00:00},{^2012-5-24 14:00:00}).Pictures = "pic1"
endwith

dBASE Plus

local oSchedule,var_Event

oSchedule = form.Activex1.nativeObject
oSchedule.Calendar.Selection = "05/24/2012"
oSchedule.Pictures.Add("pic1","c:\exontrol\images\zipdisk.gif")
// oSchedule.Events.Add("05/24/2012 09:00:00","05/24/2012 14:00:00").Pictures = "pic1"
var_Event = oSchedule.Events.Add("05/24/2012 09:00:00","05/24/2012 14:00:00")
with (oSchedule)
	TemplateDef = [Dim var_Event]
	TemplateDef = var_Event
	Template = [var_Event.Pictures = "pic1"]
endwith

XBasic (Alpha Five)

Dim oSchedule as P
Dim var_Event as P

oSchedule = topparent:CONTROL_ACTIVEX1.activex
oSchedule.Calendar.Selection = {05/24/2012}
oSchedule.Pictures.Add("pic1","c:\exontrol\images\zipdisk.gif")
' oSchedule.Events.Add({05/24/2012 09:00:00},{05/24/2012 14:00:00}).Pictures = "pic1"
var_Event = oSchedule.Events.Add({05/24/2012 09:00:00},{05/24/2012 14:00:00})
oSchedule.TemplateDef = "Dim var_Event"
oSchedule.TemplateDef = var_Event
oSchedule.Template = "var_Event.Pictures = \"pic1\""


Visual Objects


oDCOCX_Exontrol1:Calendar:Selection := SToD("20120524")
oDCOCX_Exontrol1:Pictures:Add("pic1","c:\exontrol\images\zipdisk.gif")
oDCOCX_Exontrol1:Events:Add(SToD("20120524 09:00:00"),SToD("20120524 14:00:00")):Pictures := "pic1"

PowerBuilder

OleObject oSchedule

oSchedule = ole_1.Object
oSchedule.Calendar.Selection = 2012-05-24
oSchedule.Pictures.Add("pic1","c:\exontrol\images\zipdisk.gif")
oSchedule.Events.Add(DateTime(2012-05-24,09:00:00),DateTime(2012-05-24,14:00:00)).Pictures = "pic1"