<?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: Modeless forms loosing mouse pointer in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/modeless-forms-loosing-mouse-pointer/m-p/1372781#M42262</link>
    <description>That certainly does the job. Thanks a lot !&lt;BR /&gt;
&lt;BR /&gt;
for the rest, this is how to declare the PostMessage function:&lt;BR /&gt;
&lt;BR /&gt;
Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long&lt;BR /&gt;
&lt;BR /&gt;
and then just before form.Show insert this&lt;BR /&gt;
    PostMessage ThisDrawing.hWnd, 32, 0, 0&lt;BR /&gt;
&lt;BR /&gt;
(or after any getxx function if you dont hide your form)&lt;BR /&gt;
&lt;BR /&gt;
32 is the decimal value for WM_SETCURSOR&lt;BR /&gt;
- The WM_SETCURSOR message is sent to a window if the mouse causes the cursor to move within a window and mouse input is not captured. &lt;BR /&gt;
&lt;BR /&gt;
EOT &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;</description>
    <pubDate>Thu, 07 Jul 2005 10:30:29 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2005-07-07T10:30:29Z</dc:date>
    <item>
      <title>Modeless forms loosing mouse pointer</title>
      <link>https://forums.autodesk.com/t5/vba-forum/modeless-forms-loosing-mouse-pointer/m-p/1372779#M42260</link>
      <description>I have a modeless form (with the AcFocusCtrl). There is a button on the form that hides it and calls any of the Utility.Getxx functions.  When I'm finished with picking whatever is requested - the form is displayed but the cursor is "gone" - I have to move my mouse over the form or any of the Autocad toolbars/menubars etc to "repaint" it. This means that as long as it virtually stays (I guess it's position) over the black editor area - it is invisible. When I move it over some form/menu/bar etc - it is redrawn to the standard arrow. &lt;BR /&gt;
&lt;BR /&gt;
Do I have to mention it's driving me crazy ...&lt;BR /&gt;
I searched everywhere and found nothing, pls help !&lt;BR /&gt;
&lt;BR /&gt;
my setup: WinXP Pro, Autocad 2006, VBA</description>
      <pubDate>Wed, 06 Jul 2005 22:15:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/modeless-forms-loosing-mouse-pointer/m-p/1372779#M42260</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-07-06T22:15:57Z</dc:date>
    </item>
    <item>
      <title>Re: Modeless forms loosing mouse pointer</title>
      <link>https://forums.autodesk.com/t5/vba-forum/modeless-forms-loosing-mouse-pointer/m-p/1372780#M42261</link>
      <description>As soon as your call to GetXxxxx() returns, do this:&lt;BR /&gt;
&lt;BR /&gt;
  PostMessage(ThisDrawing.HWND, 32, 0, 0);&lt;BR /&gt;
&lt;BR /&gt;
You need to import the PostMessage API to do this.&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
&lt;SIMOR&gt; wrote in message news:4894477@discussion.autodesk.com...&lt;BR /&gt;
I have a modeless form (with the AcFocusCtrl). There is a button on the form that hides it and calls any of the Utility.Getxx &lt;BR /&gt;
functions.  When I'm finished with picking whatever is requested - the form is displayed but the cursor is "gone" - I have to move &lt;BR /&gt;
my mouse over the form or any of the Autocad toolbars/menubars etc to "repaint" it. This means that as long as it virtually stays (I &lt;BR /&gt;
guess it's position) over the black editor area - it is invisible. When I move it over some form/menu/bar etc - it is redrawn to the &lt;BR /&gt;
standard arrow.&lt;BR /&gt;
&lt;BR /&gt;
Do I have to mention it's driving me crazy ...&lt;BR /&gt;
I searched everywhere and found nothing, pls help !&lt;BR /&gt;
&lt;BR /&gt;
my setup: WinXP Pro, Autocad 2006, VBA&lt;/SIMOR&gt;</description>
      <pubDate>Thu, 07 Jul 2005 01:36:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/modeless-forms-loosing-mouse-pointer/m-p/1372780#M42261</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-07-07T01:36:36Z</dc:date>
    </item>
    <item>
      <title>Re: Modeless forms loosing mouse pointer</title>
      <link>https://forums.autodesk.com/t5/vba-forum/modeless-forms-loosing-mouse-pointer/m-p/1372781#M42262</link>
      <description>That certainly does the job. Thanks a lot !&lt;BR /&gt;
&lt;BR /&gt;
for the rest, this is how to declare the PostMessage function:&lt;BR /&gt;
&lt;BR /&gt;
Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long&lt;BR /&gt;
&lt;BR /&gt;
and then just before form.Show insert this&lt;BR /&gt;
    PostMessage ThisDrawing.hWnd, 32, 0, 0&lt;BR /&gt;
&lt;BR /&gt;
(or after any getxx function if you dont hide your form)&lt;BR /&gt;
&lt;BR /&gt;
32 is the decimal value for WM_SETCURSOR&lt;BR /&gt;
- The WM_SETCURSOR message is sent to a window if the mouse causes the cursor to move within a window and mouse input is not captured. &lt;BR /&gt;
&lt;BR /&gt;
EOT &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;</description>
      <pubDate>Thu, 07 Jul 2005 10:30:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/modeless-forms-loosing-mouse-pointer/m-p/1372781#M42262</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-07-07T10:30:29Z</dc:date>
    </item>
  </channel>
</rss>

