<?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 dialog - stays on top in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/modeless-dialog-stays-on-top/m-p/9046597#M39646</link>
    <description>&lt;P&gt;My pleasure!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I fleshed out the answer a bit further still and preserved for posterity here:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://thebuildingcoder.typepad.com/blog/2019/09/ui-top-forms-buttons-web-etc.html#2" target="_blank"&gt;https://thebuildingcoder.typepad.com/blog/2019/09/ui-top-forms-buttons-web-etc.html#2&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 25 Sep 2019 09:14:04 GMT</pubDate>
    <dc:creator>jeremytammik</dc:creator>
    <dc:date>2019-09-25T09:14:04Z</dc:date>
    <item>
      <title>Modeless dialog - stays on top</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/modeless-dialog-stays-on-top/m-p/9042359#M39643</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've created an addon that runs along use the normal user use of revit and allows the user to open certain views - it uses a modeless dialog.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This works well, but I've set TopMost property of the dialog to True otherwise I keep losing the dialog behind other windows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The issue is, that with this set, the dialog then stays on top and annoyingly covers other windows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like the window to follow Revit's window, minimise with it and stay the level with it - so when a window covers Revit, it covers the dialog too.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd appreciate some examples or pointers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Tue, 24 Sep 2019 07:38:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/modeless-dialog-stays-on-top/m-p/9042359#M39643</guid>
      <dc:creator>Kevin.Bell</dc:creator>
      <dc:date>2019-09-24T07:38:07Z</dc:date>
    </item>
    <item>
      <title>Re: Modeless dialog - stays on top</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/modeless-dialog-stays-on-top/m-p/9042495#M39644</link>
      <description>&lt;P&gt;This can be easily fixed by making the Revit main window the owner window of your modeless dialogue, and your modeless dialogue a child of the Revit main window.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I implemented the JtWindowHandle class to help achieve this in the past, so you can search The Building Coder for that term to find a number of solutions:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.google.com/search?q=JtWindowHandle&amp;amp;as_sitesearch=thebuildingcoder.typepad.com" target="_blank"&gt;https://www.google.com/search?q=JtWindowHandle&amp;amp;as_sitesearch=thebuildingcoder.typepad.com&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please note that the Revit API provides official access to the main Revit window nowadays via the UIApplicaiton class MainWindowHandle property:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.revitapidocs.com/2020/e28d23a9-6814-1e70-9943-1ee852887dae.htm" target="_blank"&gt;https://www.revitapidocs.com/2020/e28d23a9-6814-1e70-9943-1ee852887dae.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jeremy&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Sep 2019 08:18:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/modeless-dialog-stays-on-top/m-p/9042495#M39644</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2019-09-24T08:18:14Z</dc:date>
    </item>
    <item>
      <title>Re: Modeless dialog - stays on top</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/modeless-dialog-stays-on-top/m-p/9045346#M39645</link>
      <description>&lt;P&gt;Ok, thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Sep 2019 20:58:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/modeless-dialog-stays-on-top/m-p/9045346#M39645</guid>
      <dc:creator>Kevin.Bell</dc:creator>
      <dc:date>2019-09-24T20:58:24Z</dc:date>
    </item>
    <item>
      <title>Re: Modeless dialog - stays on top</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/modeless-dialog-stays-on-top/m-p/9046597#M39646</link>
      <description>&lt;P&gt;My pleasure!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I fleshed out the answer a bit further still and preserved for posterity here:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://thebuildingcoder.typepad.com/blog/2019/09/ui-top-forms-buttons-web-etc.html#2" target="_blank"&gt;https://thebuildingcoder.typepad.com/blog/2019/09/ui-top-forms-buttons-web-etc.html#2&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2019 09:14:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/modeless-dialog-stays-on-top/m-p/9046597#M39646</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2019-09-25T09:14:04Z</dc:date>
    </item>
  </channel>
</rss>

