Hi,
we are implementing drag and drop from another control to an UltraDayView and we want to highlight the appointment(change bordercolor for example) that is below the cursor when the user is doing the drag and dropping.
Any ideas for implementing this feature?
Thanks,
finally we found a solution. We implement it with this events:
Private lastApp As Appointment
Private Sub UltraDayView1_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles UltraDayView1.DragDrop
Dim _IdPet As Guid = e.Data.GetData(GetType(Guid)) If _IdPet <> Guid.Empty Then MsgBox(_IdPet.ToString) End If
If lastApp IsNot Nothing Then lastApp.Appearance.ResetBorderColor() End If
End Sub
Private Sub UltraDayView1_DragEnter(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles UltraDayView1.DragEnter
e.Effect = DragDropEffects.Copy
Private Sub UltraDayView1_DragLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles UltraDayView1.DragLeave
Private Sub UltraDayView1_DragOver(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles UltraDayView1.DragOver
Dim app As Appointment = Nothing app = UltraDayView1.GetAppointmentFromPoint(UltraDayView1.PointToClient(New Point(e.X, e.Y))) If app IsNot Nothing Then app.Appearance.BorderColor = Color.Red End If lastApp = app
Hello,
Thank you for your feedback.
I am glad to hear that you were able to solve your issue.
Let me know if you have any further questions.