<?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: control z-level of forms in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/control-z-level-of-forms/m-p/6070503#M36928</link>
    <description>&lt;P&gt;I have seen this behaviour before. &amp;nbsp;I believe the answer is don't use hide in the 2nd form. &amp;nbsp;Hide or dispose the 2nd form from the 1st.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have also used dialog result if necessary. &amp;nbsp;If the 1st form needs a response from the 2nd, you can use dialog result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Form1 myform = new Form1();&lt;BR /&gt;acapp.Application.ShowModalDialog(null, myform, false);&lt;BR /&gt; if (myform.DialogResult == DialogResult.OK)&lt;BR /&gt; { }&lt;/P&gt;
&lt;P&gt;myform.dispose();&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Form1 could contain something like this:&lt;/P&gt;
&lt;P&gt;private void cmbOK_Click(object sender, EventArgs e)&lt;BR /&gt; {&lt;BR /&gt; DialogResult = DialogResult.OK;&lt;BR /&gt; // don't use hide - there is a screen flash of other open windows (like explorer)&lt;BR /&gt; // Hide();&lt;BR /&gt; }&lt;/P&gt;</description>
    <pubDate>Fri, 04 Mar 2016 14:58:26 GMT</pubDate>
    <dc:creator>fieldguy</dc:creator>
    <dc:date>2016-03-04T14:58:26Z</dc:date>
    <item>
      <title>control z-level of forms</title>
      <link>https://forums.autodesk.com/t5/net-forum/control-z-level-of-forms/m-p/6068011#M36927</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I:&lt;/P&gt;&lt;P&gt;1. start a windows form in AutoCad with .show (modeless form) or .showdialog (modal form),&lt;/P&gt;&lt;P&gt;2. start another form inside this form,&lt;/P&gt;&lt;P&gt;3. close this second form with .hide&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;..most of the time other open applications like Outlook, or notepad appear in between AutoCad and the first opened form. How can I keep the forms always on top of AutoCad and prevent other applications from appearing? Only when AutoCad is active&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think Gui.topmost is not an option, because when I need to switch to another application, this form remains on top.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;kind regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Wouter de Haan&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2016 13:02:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/control-z-level-of-forms/m-p/6068011#M36927</guid>
      <dc:creator>wbdehaan</dc:creator>
      <dc:date>2016-03-03T13:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: control z-level of forms</title>
      <link>https://forums.autodesk.com/t5/net-forum/control-z-level-of-forms/m-p/6070503#M36928</link>
      <description>&lt;P&gt;I have seen this behaviour before. &amp;nbsp;I believe the answer is don't use hide in the 2nd form. &amp;nbsp;Hide or dispose the 2nd form from the 1st.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have also used dialog result if necessary. &amp;nbsp;If the 1st form needs a response from the 2nd, you can use dialog result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Form1 myform = new Form1();&lt;BR /&gt;acapp.Application.ShowModalDialog(null, myform, false);&lt;BR /&gt; if (myform.DialogResult == DialogResult.OK)&lt;BR /&gt; { }&lt;/P&gt;
&lt;P&gt;myform.dispose();&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Form1 could contain something like this:&lt;/P&gt;
&lt;P&gt;private void cmbOK_Click(object sender, EventArgs e)&lt;BR /&gt; {&lt;BR /&gt; DialogResult = DialogResult.OK;&lt;BR /&gt; // don't use hide - there is a screen flash of other open windows (like explorer)&lt;BR /&gt; // Hide();&lt;BR /&gt; }&lt;/P&gt;</description>
      <pubDate>Fri, 04 Mar 2016 14:58:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/control-z-level-of-forms/m-p/6070503#M36928</guid>
      <dc:creator>fieldguy</dc:creator>
      <dc:date>2016-03-04T14:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: control z-level of forms</title>
      <link>https://forums.autodesk.com/t5/net-forum/control-z-level-of-forms/m-p/6202218#M36929</link>
      <description>&lt;P&gt;Hi Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I started the interfaces with .show and .showdialog instead of&amp;nbsp;&lt;SPAN&gt;acapp.Application.ShowModalDialog(Gui)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;kind regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Wouter&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Mar 2016 12:49:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/control-z-level-of-forms/m-p/6202218#M36929</guid>
      <dc:creator>wbdehaan</dc:creator>
      <dc:date>2016-03-07T12:49:34Z</dc:date>
    </item>
  </channel>
</rss>

