Type | Description | |||
By as Variant | A double expression that specifies the delay to move the current event, or a string expression that indicates the hour and minutes to delay the current event. For instance, MoveBy("00:15") moves the current event 15 minutes later. |
The following samples move the specified event back with 15 minutes:
VBA (MS Access, Excell...)
With Schedule1 .BeginUpdate .Calendar.Selection = #5/24/2012# .Events.Add(#5/24/2012 10:00:00 AM#,#5/24/2012 0:00:00 PM#).MoveBy "-00:15" .EndUpdate End With
VB6
With Schedule1 .BeginUpdate .Calendar.Selection = #5/24/2012# .Events.Add(#5/24/2012 10:00:00 AM#,#5/24/2012 0:00:00 PM#).MoveBy "-00:15" .EndUpdate End With
VB.NET
With Exschedule1 .BeginUpdate() .Calendar.Selection = #5/24/2012# .Events.Add(#5/24/2012 10:00:00 AM#,#5/24/2012 0:00:00 PM#).MoveBy("-00:15") .EndUpdate() End With
VB.NET for /COM
With AxSchedule1 .BeginUpdate() .Calendar.Selection = #5/24/2012# .Events.Add(#5/24/2012 10:00:00 AM#,#5/24/2012 0:00:00 PM#).MoveBy("-00:15") .EndUpdate() 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->BeginUpdate(); spSchedule1->GetCalendar()->PutSelection("5/24/2012"); spSchedule1->GetEvents()->Add("5/24/2012 10:00:00 AM","5/24/2012 12:00:00 PM")->MoveBy("-00:15"); spSchedule1->EndUpdate();
C++ Builder
Schedule1->BeginUpdate(); Schedule1->Calendar->set_Selection(TVariant(TDateTime(2012,5,24).operator double())); Schedule1->Events->Add(TVariant(TDateTime(2012,5,24,10,00,00,0).operator double()),TVariant(TDateTime(2012,5,24,12,00,00,0).operator double()))->MoveBy(TVariant("-00:15")); Schedule1->EndUpdate();
C#
exschedule1.BeginUpdate(); exschedule1.Calendar.Selection = Convert.ToDateTime("5/24/2012",System.Globalization.CultureInfo.GetCultureInfo("en-US")); exschedule1.Events.Add(Convert.ToDateTime("5/24/2012 10:00:00 AM",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("5/24/2012 12:00:00 PM",System.Globalization.CultureInfo.GetCultureInfo("en-US"))).MoveBy("-00:15"); exschedule1.EndUpdate();
JavaScript
<OBJECT classid="clsid:9B09E13D-7A88-4299-9DBE-383380435377" id="Schedule1"></OBJECT> <SCRIPT LANGUAGE="JScript"> Schedule1.BeginUpdate(); Schedule1.Calendar.Selection = "5/24/2012"; Schedule1.Events.Add("5/24/2012 10:00:00 AM","5/24/2012 12:00:00 PM").MoveBy("-00:15"); Schedule1.EndUpdate(); </SCRIPT>
C# for /COM
axSchedule1.BeginUpdate(); axSchedule1.Calendar.Selection = Convert.ToDateTime("5/24/2012",System.Globalization.CultureInfo.GetCultureInfo("en-US")); axSchedule1.Events.Add(Convert.ToDateTime("5/24/2012 10:00:00 AM",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("5/24/2012 12:00:00 PM",System.Globalization.CultureInfo.GetCultureInfo("en-US"))).MoveBy("-00:15"); axSchedule1.EndUpdate();
X++ (Dynamics Ax 2009)
public void init() { COM com_Event; anytype var_Event; ; super(); exschedule1.BeginUpdate(); exschedule1.Calendar().Selection(COMVariant::createFromDate(str2Date("5/24/2012",213))); var_Event = COM::createFromObject(exschedule1.Events()).Add(COMVariant::createFromUtcDateTime(str2Datetime("5/24/2012 10:00:00",213)),COMVariant::createFromUtcDateTime(str2Datetime("5/24/2012 12:00:00",213))); com_Event = var_Event; com_Event.MoveBy("-00:15"); exschedule1.EndUpdate(); }
Delphi 8 (.NET only)
with AxSchedule1 do begin BeginUpdate(); Calendar.Selection := '5/24/2012'; Events.Add('5/24/2012 10:00:00 AM','5/24/2012 12:00:00 PM').MoveBy('-00:15'); EndUpdate(); end
Delphi (standard)
with Schedule1 do begin BeginUpdate(); Calendar.Selection := '5/24/2012'; Events.Add('5/24/2012 10:00:00 AM','5/24/2012 12:00:00 PM').MoveBy('-00:15'); EndUpdate(); end
VFP
with thisform.Schedule1 .BeginUpdate .Calendar.Selection = {^2012-5-24} .Events.Add({^2012-5-24 10:00:00},{^2012-5-24 12:00:00}).MoveBy("-00:15") .EndUpdate endwith
dBASE Plus
local oSchedule oSchedule = form.Activex1.nativeObject oSchedule.BeginUpdate() oSchedule.Calendar.Selection = "05/24/2012" oSchedule.Events.Add("05/24/2012 10:00:00","05/24/2012 12:00:00").MoveBy("-00:15") oSchedule.EndUpdate()
XBasic (Alpha Five)
Dim oSchedule as P oSchedule = topparent:CONTROL_ACTIVEX1.activex oSchedule.BeginUpdate() oSchedule.Calendar.Selection = {05/24/2012} oSchedule.Events.Add({05/24/2012 10:00:00},{05/24/2012 12:00:00}).MoveBy("-00:15") oSchedule.EndUpdate()
Visual Objects
oDCOCX_Exontrol1:BeginUpdate() oDCOCX_Exontrol1:Calendar:Selection := SToD("20120524") oDCOCX_Exontrol1:Events:Add(SToD("20120524 10:00:00"),SToD("20120524 12:00:00")):MoveBy("-00:15") oDCOCX_Exontrol1:EndUpdate()
PowerBuilder
OleObject oSchedule oSchedule = ole_1.Object oSchedule.BeginUpdate() oSchedule.Calendar.Selection = 2012-05-24 oSchedule.Events.Add(DateTime(2012-05-24,10:00:00),DateTime(2012-05-24,12:00:00)).MoveBy("-00:15") oSchedule.EndUpdate()