I have figured out a workaround
What I do now is have a timercontrol set to 1 second (disabled) that is triggered at the end of the dblclick
event of the calendar. The timer simply sets the calendarcontrol.ReadOnlyMode = false
And in the dblclick event of the calendar i
nakCalendar.ReadOnlyMode = True
Then I can open my forms and the darn inline edit doesnt fire,
enable my timer to run 1 second after the dblclick event so that the code
runs to open my desired window
timerOPENContactWindow.Enabled = True
and now my form can open and the calendar inline edit never fires (returning
focus to it) and in 1 second the timer events fire to reenabled the calendar control.
Kindof a pain but it works
Private Sub nakcalendar_DblClick() Dim HitTest As CalendarHitTestInfo Set HitTest = nakCalendar.ActiveView.HitTest nakCalendar.ReadOnlyMode = True ' Dim Events As CalendarEvents If Not HitTest.HitCode = xtpCalendarHitTestUnknown Then ' Set Events = CalendarControl.DataProvider.RetrieveDayEvents(HitTest.ViewDay.Date) End If If HitTest.ViewEvent Is Nothing Then Dim newEventForm As Form Set newEventForm = New frmEvent_AddEdit newEventForm.NewEvent newEventForm.Show Else 'only modify if not a call back If HitTest.ViewEvent.Event.CustomProperties.Property("SpecialCallBackEvent") = "no" Then ModifyEvent HitTest.ViewEvent.Event Else Dim nForm As Form Dim sPos As Long Set nForm = New frmCONTACTS_Details nForm.Tag = HitTest.ViewEvent.Event.CustomProperties.Property("FIDOContactID") nForm.Show Set nForm = Nothing AddNewOpenedFORM
End If End If
timerOPENContactWindow.Enabled = True End Sub
Private Sub timerOPENContactWindow_Timer()
timerOPENContactWindow.Enabled = False nakCalendar.ReadOnlyMode = False
End Sub
|