<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : Determine if user is editing event</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Calendar : Determine if user is editing event]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 30 May 2026 02:13:57 +0000</pubDate>
  <lastBuildDate>Sun, 20 Jan 2008 16:06:04 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=9352</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[Determine if user is editing event :  Here&amp;#039;s a better way if...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9352&amp;PID=30314&amp;title=determine-if-user-is-editing-event#30314</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2676">jpbro</a><br /><strong>Subject:</strong> 9352<br /><strong>Posted:</strong> 20 January 2008 at 4:06pm<br /><br />Here's a better way if you don't mind using the API. First in a Module:<br><br>Private mlngEditHwnd As Long<br><br>Private Function EnumWindowsCallback(ByVal hwnd As Long, ByVal lParam As Long) As Long<br>&nbsp;&nbsp;&nbsp; Dim strClass As String<br>&nbsp;&nbsp;&nbsp; Const cstrCalendarEditClass As String = "edit" ' Class name of the in-place editor<br>&nbsp;&nbsp;&nbsp; Const clngMaxClassName As Long = 255<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; strClass = Space$(clngMaxClassName)<br>&nbsp;&nbsp;&nbsp; GetClassName hwnd, strClass, Len(strClass)<br><br>&nbsp;&nbsp;&nbsp; Select Case LCase$(TrimToNull(strClass))<br>&nbsp;&nbsp;&nbsp; Case cstrCalendarEditClass<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' Found the edit window of the CalendarControl, so it is visible/in-use<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mlngEditHwnd = hwnd<br>&nbsp;&nbsp;&nbsp; Case Else<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' Different class found, so keep searching<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EnumWindowsCallback = 1<br>&nbsp;&nbsp;&nbsp; End Select<br>End Function<br><br>Public Function InplaceEditHwnd(pCalendarHwnd As Long) As Long<br>&nbsp;&nbsp;&nbsp; mlngEditHwnd = 0&nbsp;&nbsp;&nbsp; ' Reset the last found hWnd<br>&nbsp;&nbsp;&nbsp; EnumChildWindows pCalendarHwnd, AddressOf EnumWindowsCallback, 0<br>&nbsp;&nbsp;&nbsp; InplaceEditHwnd = mlngEditHwnd ' Return the new hWnd if found, or 0 if not found<br>End Function<br><br>Public Function InplaceEditVisible(pCalendarHwnd As Long) As Boolean<br>&nbsp;&nbsp;&nbsp; InplaceEditVisible = CBool(InplaceEditHwnd(pCalendarHwnd))<br>End Function<br><br><br>Then in the form with the Calendar control:<br><br>Private Sub CalendarControl_KeyDown(KeyCode As Integer, Shift As Integer)<br>&nbsp;&nbsp;&nbsp; Select Case KeyCode<br>&nbsp;&nbsp;&nbsp; Case vbKeyReturn<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If Not InplaceEditVisible(Me.CalendarControl.hwnd) Then<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;&nbsp;  ' User is not editing the select event<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If CalendarControl.ActiveView.GetSelectedEvents.Count = 1 Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' Only one event is selected, so show the custom editor form<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ModifyEvent CalendarControl.ActiveView.GetSelectedEvents.ViewEvent(0).Event<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br>&nbsp;&nbsp;&nbsp; End Select<br>End Sub]]>
   </description>
   <pubDate>Sun, 20 Jan 2008 16:06:04 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9352&amp;PID=30314&amp;title=determine-if-user-is-editing-event#30314</guid>
  </item> 
  <item>
   <title><![CDATA[Determine if user is editing event : Hi wlcabral, thanks again for...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9352&amp;PID=30313&amp;title=determine-if-user-is-editing-event#30313</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2676">jpbro</a><br /><strong>Subject:</strong> 9352<br /><strong>Posted:</strong> 20 January 2008 at 3:39pm<br /><br />Hi wlcabral, thanks again for your help. Here is what I have had to do to allow me to show a special event modification form when the user hits return while not currently editing an event:<br><br>'-------------------------------------------------------------------------------------<br>Private mlngEditing As Boolean<br><br>Private Sub CalendarControl_KeyDown(KeyCode As Integer, Shift As Integer)<br>&nbsp;&nbsp;&nbsp; Select Case KeyCode<br>&nbsp;&nbsp;&nbsp; Case vbKeyReturn<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If Not mblnEditing Then<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;&nbsp;  ' User is not using in-place editor<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If Me.CalendarControl.ActiveView.GetSelectedEvents.Count = 1 Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' Only one event is selected, so modify it<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ModifyEvent Me.CalendarControl.ActiveView.GetSelectedEvents.ViewEvent(0).Event<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Else<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' User hit return, so editing is finished (even if no change to the event was made)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mblnEditing = False<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br>&nbsp;&nbsp;&nbsp; Case vbKeyEscape<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' User cancelled editing, so clear the in-place editor flag<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mblnEditing = False<br>&nbsp;&nbsp;&nbsp; End Select<br>End Sub<br><br>Private Sub CalendarControl_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)<br>&nbsp;&nbsp;&nbsp; Dim objHit As CalendarHitTestInfo<br><br>&nbsp;&nbsp;&nbsp; Set objHit = Me.CalendarControl.ActiveView.HitTest<br><br>&nbsp;&nbsp;&nbsp; Select Case objHit.HitCode<br>&nbsp;&nbsp;&nbsp; Case Is &lt;&gt; xtpCalendarHitTestEventTextArea<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' User clicked outside of the in-place editor<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;  ' Turn-off the inplace editor flag<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mblnEditing = False<br>&nbsp;&nbsp;&nbsp; End Select<br><br>&nbsp;&nbsp;&nbsp; Set objHit = Nothing<br>End Sub<br><br>Private Sub CalendarControl_BeforeEditOperation(ByVal OpParams As XtremeCalendarControl.CalendarEditOperationParameters, CancelOperation As Boolean)<br>&nbsp;&nbsp;&nbsp; Select Case OpParams.Operation<br>&nbsp;&nbsp;&nbsp; Case xtpCalendarEO_EditSubject_ByF2, xtpCalendarEO_EditSubject_ByTab, xtpCalendarEO_EditSubject_AfterEventResize, xtpCalendarEO_EditSubject_ByMouseClick, xtpCalendarEO_InPlaceCreateEvent<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;  ' User is editing an event using the in-place editor<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;  ' So set the in-place editor flag to True<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mblnEditing = True<br>&nbsp;&nbsp;&nbsp; Case Else<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;  ' User is performing another edit action, so the in-place<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' editor is not visible. Set the in-place editor flag to False<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mblnEditing = False<br>&nbsp;&nbsp;&nbsp; End Select<br>End Sub<br><br>Private Sub CalendarControl_EventChangedEx(ByVal pEvent As XtremeCalendarControl.CalendarEvent)<br>&nbsp;&nbsp;&nbsp; ' Turn off the in-place editing flag since the event has been changed by the user.<br>&nbsp;&nbsp;&nbsp; ' NOTE: This event only fires if changes have been made to the event, so we still have to manually turn off the flag in cases where the user clicks off of the in-place editor, or hits the ESC key<br>&nbsp;&nbsp;&nbsp; mblnEditing = False<br>End Sub<br>'-------------------------------------------------------------------------------------<br><br>Unfortunately, a pretty big chunk of code that also happens to run the risk of a bug if there are situations that I don't know about that can cause the in-place editor to hide. <br><br>A property to check whether the in-place editor is visible or not would be really valuable, as wold a way to be able to start/stop in-place editing via a method.<br>]]>
   </description>
   <pubDate>Sun, 20 Jan 2008 15:39:53 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9352&amp;PID=30313&amp;title=determine-if-user-is-editing-event#30313</guid>
  </item> 
  <item>
   <title><![CDATA[Determine if user is editing event : If you set a flag before start...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9352&amp;PID=30311&amp;title=determine-if-user-is-editing-event#30311</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2958">wlcabral</a><br /><strong>Subject:</strong> 9352<br /><strong>Posted:</strong> 20 January 2008 at 1:10pm<br /><br /><P =Ms&#111;normal style="MARGIN: 0in 0in 10pt"><FONT face=Calibri size=3>If you set a flag before start editing :</FONT></P><P><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Tahoma','sans-serif'">if opParams.operation = xtpCalendarEO_InPlaceCreateEvent&nbsp; <?:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 10pt"><FONT size=3><FONT face=Calibri><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>I_was_editing = True</FONT></FONT></P><P =Ms&#111;normal style="MARGIN: 0in 0in 10pt"><FONT face=Calibri size=3>endif</FONT></P><P =Ms&#111;normal style="MARGIN: 0in 0in 10pt"><FONT face=Calibri size=3>and check for this flag in keyDow event :</FONT></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">if </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'">keycode = ENTER<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 10pt"><FONT size=3><FONT face=Calibri><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>if I_was_editing = True</FONT></FONT></P><P =Ms&#111;normal style="MARGIN: 0in 0in 10pt"><FONT size=3><FONT face=Calibri><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>I_was_editing = False</FONT></FONT></P><P =Ms&#111;normal style="MARGIN: 0in 0in 10pt"><FONT size=3><FONT face=Calibri><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>‘call any code</FONT></FONT></P><P =Ms&#111;normal style="MARGIN: 0in 0in 10pt"><FONT size=3><FONT face=Calibri><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>endif</FONT></FONT></P><P =Ms&#111;normal style="MARGIN: 0in 0in 10pt"><FONT face=Calibri size=3>endif</P><DIV></DIV></FONT>]]>
   </description>
   <pubDate>Sun, 20 Jan 2008 13:10:45 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9352&amp;PID=30311&amp;title=determine-if-user-is-editing-event#30311</guid>
  </item> 
  <item>
   <title><![CDATA[Determine if user is editing event : Thanks for the help on the other...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9352&amp;PID=30304&amp;title=determine-if-user-is-editing-event#30304</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2676">jpbro</a><br /><strong>Subject:</strong> 9352<br /><strong>Posted:</strong> 19 January 2008 at 6:31pm<br /><br />Thanks for the help on the other 2 questions, I was able to get the results I required.<br><br>Unfortunately, the BeforeEditOperation event isn't where I need to test for the InPlace edit window, I need to know if the edit window is visible during the KeyDown event. What I am trying to do is automatically bring up a detailed event window when the user presses return, but not if the edit window is visible (since return in this case should complete the edit operation).<br><br>If anyone from Codejock is reading, the following events and properties would be useful:<br><br>AfterEditOperation event (fired after the user finishes inplace editing in particular)<br>EditHwnd property or InPlaceEditVisible property (to determine at any time if the inplace editor is visible)<br><br>Thanks.<br>]]>
   </description>
   <pubDate>Sat, 19 Jan 2008 18:31:53 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9352&amp;PID=30304&amp;title=determine-if-user-is-editing-event#30304</guid>
  </item> 
  <item>
   <title><![CDATA[Determine if user is editing event : In beforeEditOperation event you...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9352&amp;PID=30297&amp;title=determine-if-user-is-editing-event#30297</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2958">wlcabral</a><br /><strong>Subject:</strong> 9352<br /><strong>Posted:</strong> 19 January 2008 at 12:48pm<br /><br /><DIV>In beforeEditOperation event you need to check opParams.operation :</DIV><DIV>&nbsp;</DIV><FONT face=Tahoma size=2><P>if opParams.operation = xtpCalendarEO_InPlaceCreateEvent&nbsp; then you are editing the event.&nbsp; </P><DIV></DIV><DIV></FONT>&nbsp;</DIV>]]>
   </description>
   <pubDate>Sat, 19 Jan 2008 12:48:06 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9352&amp;PID=30297&amp;title=determine-if-user-is-editing-event#30297</guid>
  </item> 
  <item>
   <title><![CDATA[Determine if user is editing event : Is there a way to determine if...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9352&amp;PID=30285&amp;title=determine-if-user-is-editing-event#30285</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2676">jpbro</a><br /><strong>Subject:</strong> 9352<br /><strong>Posted:</strong> 18 January 2008 at 4:09pm<br /><br />Is there a way to determine if a user is editing an event in-place?&nbsp; (e.g. an IsEditing or EditHwnd property?)<br><br>Thanks.<br>]]>
   </description>
   <pubDate>Fri, 18 Jan 2008 16:09:50 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9352&amp;PID=30285&amp;title=determine-if-user-is-editing-event#30285</guid>
  </item> 
 </channel>
</rss>