Fired when the user finishes dragging an appointment, but before it drops.
Parameters
Parameter | Description |
---|---|
ApptID | ID of the appointment |
EntityID | ID of the appointment's parent entity |
OldEntityID | ID of the appointment's previous parent entity |
OldStartDateTime | The old start date & time |
OldEndDateTime | The old end date & time |
OldLeadTime | The old lead time |
OldTrailTime | The 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