Fired when the user finishes dragging an appointment, but before it drops.

Parameters

ParameterDescription
ApptIDID of the appointment
EntityIDID of the appointment's parent entity
OldEntityIDID of the appointment's previous parent entity
OldStartDateTimeThe old start date & time
OldEndDateTimeThe old end date & time
OldLeadTimeThe old lead time
OldTrailTimeThe old trail time

Remarks

The BeforeApptDrop event is fired when the user releases the mouse button at the end of a drag operation, but before the appointment is actually placed in the new location. This event gives the developer the opportunity to decide if the appointment should be dropped at the given location. To cancel the drop, simply set the Cancel property to 1.

The ApptID parameter is the unique ID of the appointment that has been moved. The EntityID parameter is the unique ID of the entity to which the appointment now belongs. The OldEntityID parameter is the appointment's previous entity. The OldStartDateTime and OldEndDateTime parameters are the appointment's previous start and end times respectfully. Finally, the OldLeadTime and OldTrailTime parameters are ther appoitment's previous lead and trail times.

Use the Appt property to access the appointment's new Start Time, End Time, Lead Time, or Trail Time. Then compare them with the given parameters to determine what actually changed. For instance, the user may have simply moved the appointment to a new entity without changing the start and end times. Likewise, the user may have merely stretched the bottom of an appointment, so the entity and start time hasn't changed.

Example

Transfer Param1 to ApptID 
Transfer Param2 to EntityID 
Transfer Param3 to OldEntityID 
Transfer Param4 to OldStartDateTime 
Transfer Param5 to OldEndDateTime 
Transfer Param6 to OldLeadTime 
Transfer Param7 to OldTrailTime 

// Allow the appointment to drop in limited circumstances 
If VerifyApptToEntity(EntityID) EQ No$ then 
   Set_Property(CtrlEntId, "OLE.Cancel", Yes$) 
end

See Also

BeforeApptDragCancelApptDragAfterApptDrop

  • No labels