<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: IMouseCursor does not stay set to hourglass whle query runs in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/imousecursor-does-not-stay-set-to-hourglass-whle/m-p/198136#M5160</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Carlos,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Glad to hear you figured it out.&amp;nbsp; I'm unsure where exactly you'd need to put the Windows.Forms.Cursor.Current property in your app to get it to work --- I have placed these at the beginning and end of a click events in several of my apps (Windows form control) and have no problems.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;No, never did work at SFWD but a while ago Chickasaw Nation I think was the GIS contractor for the Everglades restoration project and they approached me to see about a temporary developer position located in that office --- nothing ever came out of it, I think because they lost the contract?&amp;nbsp; Not sure.&amp;nbsp; Perhaps you were there at the interview.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Good luck.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;james&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;James,&lt;BR /&gt;&lt;BR /&gt;I was not able to get it to work with your suggestions but by pure trial and error, I was able to solve it. At one point, the code that populates the listbox, uses ITrackCancel to sort the results before displaying them in the listbox and when it hits that line of code, the cursor goes back to a pointer. Reissung pMouseCursor.SetCursor(2); right afterwards resets the cursor back to the hourglass for the duration of the code. The cursor does briefly (a second or two) switches to the pointer between the two lines of code but that's fine. &lt;BR /&gt;&lt;BR /&gt;Yes, I am in the West Palm office off Gun Club road. Did you work at the District in the past? Your name does sound familiar to me for some reason. I've been here since 1988.&lt;BR /&gt;&lt;BR /&gt;Anyhow, thanks for your time and your help. As always, I appreciate it a lot!!!&lt;BR /&gt;Carlos&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Aug 2010 12:44:56 GMT</pubDate>
    <dc:creator>JamesCrandall</dc:creator>
    <dc:date>2010-08-18T12:44:56Z</dc:date>
    <item>
      <title>IMouseCursor does not stay set to hourglass whle query runs</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/imousecursor-does-not-stay-set-to-hourglass-whle/m-p/198131#M5155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi everyone,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a form which has a listbox on it displaying all lakes in the state so the user can select which one they want to load and zoom to.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;On the InitializeComponent(); section of a C# form, I set the mouse cursor to an hourglass with this code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;IMouseCursor pMouseCursor = new MouseCursorClass();
pMouseCursor.SetCursor(2);&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Right after this line, the code calls another method which queries the lakes layer, puts all of the names into an array and returns this to the listbox for display. As soon as the code goes to the method that does the query, the cursor returns to the pointer instead of staying an hourglass. Trying to set the cursor back to hourglass inside of this query method has no effect. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This query can sometimes take up to a minute to run depending on network traffic so I definitely want to show the user that code is running and not have them think the program is locked up.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas on how to fix this? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Carlos&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Aug 2010 11:41:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/imousecursor-does-not-stay-set-to-hourglass-whle/m-p/198131#M5155</guid>
      <dc:creator>CarlosPiccirillo</dc:creator>
      <dc:date>2010-08-12T11:41:16Z</dc:date>
    </item>
    <item>
      <title>Re: IMouseCursor does not stay set to hourglass whle query runs</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/imousecursor-does-not-stay-set-to-hourglass-whle/m-p/198132#M5156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Carlos,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Have you tried to implement the cursor from the parent Windows form?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Prior to the method call, set the cursor (VB.NET):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;Windows.Forms.Cursor.Current = Cursors.WaitCursor&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After the method and the return to the form, re-set the cursor:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;Windows.Forms.Cursor.Current = Cursors.Arrow&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;james&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Aug 2010 13:27:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/imousecursor-does-not-stay-set-to-hourglass-whle/m-p/198132#M5156</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2010-08-12T13:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: IMouseCursor does not stay set to hourglass whle query runs</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/imousecursor-does-not-stay-set-to-hourglass-whle/m-p/198133#M5157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the reply James and my apologies for replying so late. The new forums is not notifying me of when I get a new message in spite of me setting it to send email immediately so if I forget to check for new messages myself, I don't see them and in this case, I got pulled away from this problem to take care of another one. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyhow, I will give your suggestion a try.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Carlos&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Carlos,&lt;BR /&gt;&lt;BR /&gt;Have you tried to implement the cursor from the parent Windows form?&lt;BR /&gt;&lt;BR /&gt;Prior to the method call, set the cursor (VB.NET):&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;Windows.Forms.Cursor.Current = Cursors.WaitCursor&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;After the method and the return to the form, re-set the cursor:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;Windows.Forms.Cursor.Current = Cursors.Arrow&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this helps,&lt;BR /&gt;&lt;BR /&gt;james&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Aug 2010 14:02:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/imousecursor-does-not-stay-set-to-hourglass-whle/m-p/198133#M5157</guid>
      <dc:creator>CarlosPiccirillo</dc:creator>
      <dc:date>2010-08-17T14:02:05Z</dc:date>
    </item>
    <item>
      <title>Re: IMouseCursor does not stay set to hourglass whle query runs</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/imousecursor-does-not-stay-set-to-hourglass-whle/m-p/198134#M5158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;No problem at all.&amp;nbsp; Any new major switch is going to cause disruptions, and I think this forum has a ways to go to get at the activity levels seen in previous versions --- it's just a part of making major changes like this I guess.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please post up your solution when you find it!&amp;nbsp; I know what I have posted does work for many of the apps I have implemented and currently maintain (all are VB.NET framwork 3.5/ ArcGIS 9.3.1), so I'd like to hear if you found another way to accomplish this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;{Also: are you in the West Palm Beach office off of Gun Club Rd?&amp;nbsp; I'm originally from Lantana (Palm Beach County) and return quite often to visit family and freinds --- I've been residing in Charlotte County since 1999}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Take Care,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;james&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Thanks for the reply James and my apologies for replying so late. The new forums is not notifying me of when I get a new message in spite of me setting it to send email immediately so if I forget to check for new messages myself, I don't see them and in this case, I got pulled away from this problem to take care of another one. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; &lt;BR /&gt;&lt;BR /&gt;Anyhow, I will give your suggestion a try.&lt;BR /&gt;&lt;BR /&gt;Carlos&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Aug 2010 16:21:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/imousecursor-does-not-stay-set-to-hourglass-whle/m-p/198134#M5158</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2010-08-17T16:21:11Z</dc:date>
    </item>
    <item>
      <title>Re: IMouseCursor does not stay set to hourglass whle query runs</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/imousecursor-does-not-stay-set-to-hourglass-whle/m-p/198135#M5159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;James,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was not able to get it to work with your suggestions but by pure trial and error, I was able to solve it. At one point, the code that populates the listbox, uses ITrackCancel to sort the results before displaying them in the listbox and when it hits that line of code, the cursor goes back to a pointer. Reissung pMouseCursor.SetCursor(2); right afterwards resets the cursor back to the hourglass for the duration of the code. The cursor does briefly (a second or two) switches to the pointer between the two lines of code but that's fine. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, I am in the West Palm office off Gun Club road. Did you work at the District in the past? Your name does sound familiar to me for some reason. I've been here since 1988.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyhow, thanks for your time and your help. As always, I appreciate it a lot!!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Carlos&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;No problem at all.&amp;nbsp; Any new major switch is going to cause disruptions, and I think this forum has a ways to go to get at the activity levels seen in previous versions --- it's just a part of making major changes like this I guess.&amp;nbsp; &lt;BR /&gt;&lt;BR /&gt;Please post up your solution when you find it!&amp;nbsp; I know what I have posted does work for many of the apps I have implemented and currently maintain (all are VB.NET framwork 3.5/ ArcGIS 9.3.1), so I'd like to hear if you found another way to accomplish this.&lt;BR /&gt;&lt;BR /&gt;{Also: are you in the West Palm Beach office off of Gun Club Rd?&amp;nbsp; I'm originally from Lantana (Palm Beach County) and return quite often to visit family and freinds --- I've been residing in Charlotte County since 1999}&lt;BR /&gt;&lt;BR /&gt;Take Care,&lt;BR /&gt;&lt;BR /&gt;james&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Aug 2010 12:00:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/imousecursor-does-not-stay-set-to-hourglass-whle/m-p/198135#M5159</guid>
      <dc:creator>CarlosPiccirillo</dc:creator>
      <dc:date>2010-08-18T12:00:16Z</dc:date>
    </item>
    <item>
      <title>Re: IMouseCursor does not stay set to hourglass whle query runs</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/imousecursor-does-not-stay-set-to-hourglass-whle/m-p/198136#M5160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Carlos,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Glad to hear you figured it out.&amp;nbsp; I'm unsure where exactly you'd need to put the Windows.Forms.Cursor.Current property in your app to get it to work --- I have placed these at the beginning and end of a click events in several of my apps (Windows form control) and have no problems.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;No, never did work at SFWD but a while ago Chickasaw Nation I think was the GIS contractor for the Everglades restoration project and they approached me to see about a temporary developer position located in that office --- nothing ever came out of it, I think because they lost the contract?&amp;nbsp; Not sure.&amp;nbsp; Perhaps you were there at the interview.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Good luck.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;james&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;James,&lt;BR /&gt;&lt;BR /&gt;I was not able to get it to work with your suggestions but by pure trial and error, I was able to solve it. At one point, the code that populates the listbox, uses ITrackCancel to sort the results before displaying them in the listbox and when it hits that line of code, the cursor goes back to a pointer. Reissung pMouseCursor.SetCursor(2); right afterwards resets the cursor back to the hourglass for the duration of the code. The cursor does briefly (a second or two) switches to the pointer between the two lines of code but that's fine. &lt;BR /&gt;&lt;BR /&gt;Yes, I am in the West Palm office off Gun Club road. Did you work at the District in the past? Your name does sound familiar to me for some reason. I've been here since 1988.&lt;BR /&gt;&lt;BR /&gt;Anyhow, thanks for your time and your help. As always, I appreciate it a lot!!!&lt;BR /&gt;Carlos&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Aug 2010 12:44:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/imousecursor-does-not-stay-set-to-hourglass-whle/m-p/198136#M5160</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2010-08-18T12:44:56Z</dc:date>
    </item>
  </channel>
</rss>

