<?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: Showing a dialog at cursor in Navisworks API Forum</title>
    <link>https://forums.autodesk.com/t5/navisworks-api-forum/showing-a-dialog-at-cursor/m-p/7613003#M4160</link>
    <description>&lt;P&gt;Sorry I am using WPF so sent you to long way.&lt;/P&gt;&lt;P&gt;Take a look to Position property of System.Windows.Forms.Cursor class.&lt;/P&gt;&lt;P&gt;It gives you cursor position in the screen coordinates.&lt;/P&gt;</description>
    <pubDate>Mon, 11 Dec 2017 10:39:35 GMT</pubDate>
    <dc:creator>OR_AND_NO</dc:creator>
    <dc:date>2017-12-11T10:39:35Z</dc:date>
    <item>
      <title>Showing a dialog at cursor</title>
      <link>https://forums.autodesk.com/t5/navisworks-api-forum/showing-a-dialog-at-cursor/m-p/7609521#M4156</link>
      <description>&lt;P&gt;I'm trying to show a dialog (or tooltip) at the cursor showing some informatin about the element. I have made a ToolPugin and overrid the GetTooltip to get the x and y coordinates. But those coordinates looks like they are inside the viewer window. And if I show a dialog at this point, it's offset from the cursor.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I find the cursor coordinate? Or the coordinates of the upper left corner of the viewer window would help as well. There is probably&amp;nbsp;an obvious&amp;nbsp;answer to this, but it eludes me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Frode&lt;/P&gt;</description>
      <pubDate>Fri, 08 Dec 2017 20:27:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/navisworks-api-forum/showing-a-dialog-at-cursor/m-p/7609521#M4156</guid>
      <dc:creator>FrodeTo</dc:creator>
      <dc:date>2017-12-08T20:27:43Z</dc:date>
    </item>
    <item>
      <title>Re: Showing a dialog at cursor</title>
      <link>https://forums.autodesk.com/t5/navisworks-api-forum/showing-a-dialog-at-cursor/m-p/7610462#M4157</link>
      <description>&lt;P&gt;Read about MouseMove handler in ToolPlugin class and look this usefull example: &lt;A href="http://adndevblog.typepad.com/aec/2014/09/draw-text-graphics.html" target="_blank"&gt;http://adndevblog.typepad.com/aec/2014/09/draw-text-graphics.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ToolPlugin.MouseMove Method&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV class="saveHistory"&gt;&lt;DIV class="section"&gt;&lt;DIV class="code"&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;PRE&gt;&lt;SPAN&gt;public&lt;/SPAN&gt; &lt;SPAN&gt;virtual&lt;/SPAN&gt; &lt;A href="http://msdn2.microsoft.com/en-us/library/a28wyd50" target="_blank"&gt;bool&lt;/A&gt; &lt;SPAN&gt;MouseMove&lt;/SPAN&gt;(
	&lt;A href="https://forums.autodesk.com/T_Autodesk_Navisworks_Api_View.htm" target="_blank"&gt;View&lt;/A&gt; &lt;SPAN&gt;view&lt;/SPAN&gt;,
	&lt;A href="https://forums.autodesk.com/T_Autodesk_Navisworks_Api_KeyModifiers.htm" target="_blank"&gt;KeyModifiers&lt;/A&gt; &lt;SPAN&gt;modifiers&lt;/SPAN&gt;,
	&lt;A href="http://msdn2.microsoft.com/en-us/library/td2s409d" target="_blank"&gt;int&lt;/A&gt; &lt;SPAN&gt;x&lt;/SPAN&gt;,
	&lt;A href="http://msdn2.microsoft.com/en-us/library/td2s409d" target="_blank"&gt;int&lt;/A&gt; &lt;SPAN&gt;y&lt;/SPAN&gt;,
	&lt;A href="http://msdn2.microsoft.com/en-us/library/643eft0t" target="_blank"&gt;double&lt;/A&gt; &lt;SPAN&gt;timeOffset&lt;/SPAN&gt;
)&lt;/PRE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 09 Dec 2017 13:27:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/navisworks-api-forum/showing-a-dialog-at-cursor/m-p/7610462#M4157</guid>
      <dc:creator>OR_AND_NO</dc:creator>
      <dc:date>2017-12-09T13:27:19Z</dc:date>
    </item>
    <item>
      <title>Re: Showing a dialog at cursor</title>
      <link>https://forums.autodesk.com/t5/navisworks-api-forum/showing-a-dialog-at-cursor/m-p/7612002#M4158</link>
      <description>&lt;P&gt;This solution will work if I would like a text to show at the cursor like in the example in the link.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I would like to show a dialog at the cursor. And if I use the x and y coordinates, the dialog is offset. I could need the screen coordinates of the upper left corner of the view window.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;MyForm form = new MyForm();
form.location = new System.Drawing.Point(x, view.Height - y);
form.Show();&lt;/PRE&gt;</description>
      <pubDate>Sun, 10 Dec 2017 21:09:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/navisworks-api-forum/showing-a-dialog-at-cursor/m-p/7612002#M4158</guid>
      <dc:creator>FrodeTo</dc:creator>
      <dc:date>2017-12-10T21:09:08Z</dc:date>
    </item>
    <item>
      <title>Re: Showing a dialog at cursor</title>
      <link>https://forums.autodesk.com/t5/navisworks-api-forum/showing-a-dialog-at-cursor/m-p/7612621#M4159</link>
      <description>&lt;P&gt;It seems I recognize that you want.&lt;/P&gt;&lt;P&gt;Autodesk.Navisworks.Api.Application class contains Gui propery.&lt;/P&gt;&lt;P&gt;By this property is possible to get IWin32Window interface of MainWindow that gives Handle of main window.&lt;/P&gt;&lt;P&gt;I believe, having main window handle, it is possible to get mouse position in the screen coordinates.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2017 06:41:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/navisworks-api-forum/showing-a-dialog-at-cursor/m-p/7612621#M4159</guid>
      <dc:creator>OR_AND_NO</dc:creator>
      <dc:date>2017-12-11T06:41:27Z</dc:date>
    </item>
    <item>
      <title>Re: Showing a dialog at cursor</title>
      <link>https://forums.autodesk.com/t5/navisworks-api-forum/showing-a-dialog-at-cursor/m-p/7613003#M4160</link>
      <description>&lt;P&gt;Sorry I am using WPF so sent you to long way.&lt;/P&gt;&lt;P&gt;Take a look to Position property of System.Windows.Forms.Cursor class.&lt;/P&gt;&lt;P&gt;It gives you cursor position in the screen coordinates.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2017 10:39:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/navisworks-api-forum/showing-a-dialog-at-cursor/m-p/7613003#M4160</guid>
      <dc:creator>OR_AND_NO</dc:creator>
      <dc:date>2017-12-11T10:39:35Z</dc:date>
    </item>
    <item>
      <title>Re: Showing a dialog at cursor</title>
      <link>https://forums.autodesk.com/t5/navisworks-api-forum/showing-a-dialog-at-cursor/m-p/7615925#M4161</link>
      <description>&lt;P&gt;Thank you for the help. I now use the mainWindow together with the x and y to get the correct screen coordinates.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2017 08:02:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/navisworks-api-forum/showing-a-dialog-at-cursor/m-p/7615925#M4161</guid>
      <dc:creator>FrodeTo</dc:creator>
      <dc:date>2017-12-12T08:02:50Z</dc:date>
    </item>
    <item>
      <title>Re: Showing a dialog at cursor</title>
      <link>https://forums.autodesk.com/t5/navisworks-api-forum/showing-a-dialog-at-cursor/m-p/7616709#M4162</link>
      <description>&lt;P&gt;I am glad to hearing good news!&lt;/P&gt;&lt;P&gt;Good luck in Navis World! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2017 13:08:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/navisworks-api-forum/showing-a-dialog-at-cursor/m-p/7616709#M4162</guid>
      <dc:creator>OR_AND_NO</dc:creator>
      <dc:date>2017-12-12T13:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: Showing a dialog at cursor</title>
      <link>https://forums.autodesk.com/t5/navisworks-api-forum/showing-a-dialog-at-cursor/m-p/9016636#M4163</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;Can you explain how to get this offset ?&lt;/P&gt;&lt;P&gt;I would like to get x and y offset between Window's (the OS)&amp;nbsp; origine and Naviswork's render window&lt;/P&gt;&lt;P&gt;Autodesk.Navisworks.Api.Application.Gui.MainWindow and what should I do after that ?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2019 14:11:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/navisworks-api-forum/showing-a-dialog-at-cursor/m-p/9016636#M4163</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-10T14:11:11Z</dc:date>
    </item>
  </channel>
</rss>

