<?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: How to restore a form in C# in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/how-to-restore-a-form-in-c/m-p/3691232#M52625</link>
    <description>&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;Thanks for the suggestions but unfortunately i have not had any success with either.&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;</description>
    <pubDate>Wed, 07 Nov 2012 21:39:08 GMT</pubDate>
    <dc:creator>ezcad.co.uk</dc:creator>
    <dc:date>2012-11-07T21:39:08Z</dc:date>
    <item>
      <title>How to restore a form in C#</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-restore-a-form-in-c/m-p/3691110#M52622</link>
      <description>&lt;P&gt;&lt;FONT size="2" face="arial,helvetica,sans-serif"&gt;Hi All,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="arial,helvetica,sans-serif"&gt;Visual Lisper trying to migrate to .net!&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="arial,helvetica,sans-serif"&gt;Can anyone please provide an example of how to restore a form?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="arial,helvetica,sans-serif"&gt;I have an "about" project which contains 3 forms.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="arial,helvetica,sans-serif"&gt;Form1 is displayed by default when the command is called...it contains two buttons which both close form1 &amp;amp; open form2 or form3. What I would like to happen is that when form2 or form3 is closed, form1 will be restored.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="arial,helvetica,sans-serif"&gt;This is the code which defines the command &amp;amp; shows form1:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="arial,helvetica,sans-serif"&gt;&amp;lt;code begins&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="arial,helvetica,sans-serif"&gt;[&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;CommandMethod&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;(&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;"EzAbout"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;)]&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="arial,helvetica,sans-serif"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;public &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;void &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;EzAbout()&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="arial,helvetica,sans-serif"&gt;{&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="arial,helvetica,sans-serif"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;Form1&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;tvf1;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="arial,helvetica,sans-serif"&gt;tvf1 = &lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;new&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;Form1&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;();&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="arial,helvetica,sans-serif"&gt;Autodesk.AutoCAD.ApplicationServices.&lt;/FONT&gt;&lt;FONT size="2" face="arial,helvetica,sans-serif"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;Application&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;.ShowModelessDialog(&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;null&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;, tvf1, &lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;false&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="arial,helvetica,sans-serif"&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="arial,helvetica,sans-serif"&gt;&amp;lt;code ends&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="arial,helvetica,sans-serif"&gt;This is the code from the button on form1:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="arial,helvetica,sans-serif"&gt;&amp;lt;code begins&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="arial,helvetica,sans-serif"&gt;private &lt;/FONT&gt;&lt;FONT size="2" face="arial,helvetica,sans-serif"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;void&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; button1_Click_1(&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;object&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; sender, &lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;EventArgs &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;e)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="arial,helvetica,sans-serif"&gt;{&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="arial,helvetica,sans-serif"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;this&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;.Close();&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="arial,helvetica,sans-serif"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;Form2 &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;tvf2;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="arial,helvetica,sans-serif"&gt;tvf2 = &lt;/FONT&gt;&lt;FONT size="2" face="arial,helvetica,sans-serif"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;new &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;Form2&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;();&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="arial,helvetica,sans-serif"&gt;Autodesk.AutoCAD.ApplicationServices.&lt;/FONT&gt;&lt;FONT size="2" face="arial,helvetica,sans-serif"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;Application&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;.ShowModelessDialog(&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;null&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;, tvf2, &lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;false&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="arial,helvetica,sans-serif"&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="arial,helvetica,sans-serif"&gt;&amp;lt;code ends&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="arial,helvetica,sans-serif"&gt;This is the code behind the close button on form2...trying to restore form1 (it closes form2 but does not restore form1)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="arial,helvetica,sans-serif"&gt;&amp;lt;code begins&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="arial,helvetica,sans-serif"&gt;private &lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;void&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; closeButton_Click(&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;object&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; sender, &lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;EventArgs &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;e)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="arial,helvetica,sans-serif"&gt;{&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="arial,helvetica,sans-serif"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;this&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;.Close();&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="arial,helvetica,sans-serif"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;Form1 &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;tvf1;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="arial,helvetica,sans-serif"&gt;tvf1 = &lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;new &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;Form1&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;();&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="arial,helvetica,sans-serif"&gt;Autodesk.AutoCAD.ApplicationServices.&lt;/FONT&gt;&lt;FONT size="2" face="arial,helvetica,sans-serif"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;&lt;FONT color="#2b91af"&gt;Application&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;.ShowModelessDialog(&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;null&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;, tvf1, &lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;false&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="arial,helvetica,sans-serif"&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="arial,helvetica,sans-serif"&gt;&amp;lt;code ends&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="arial,helvetica,sans-serif"&gt;Any guidance would be greatly appreciated.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="arial,helvetica,sans-serif"&gt;Thanks in advance.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="arial,helvetica,sans-serif"&gt;Steve&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2012 20:23:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-restore-a-form-in-c/m-p/3691110#M52622</guid>
      <dc:creator>ezcad.co.uk</dc:creator>
      <dc:date>2012-11-07T20:23:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to restore a form in C#</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-restore-a-form-in-c/m-p/3691154#M52623</link>
      <description>&lt;P&gt;Hi Steve,&lt;BR /&gt;&lt;BR /&gt;You can try before closing your Form2 (or Form3), you should add an event to catch this form visibility, and then this triggered event will open Form1 after Form2 closed.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;// Form2 close method
private void closeButton_Click(object sender, EventArgs e)
{
    this.VisibleChanged += OnVisibleChanged;
    this.Close();
}

private void OnVisibleChanged(object sender, EventArgs eventArgs)
{
    Form1 tvf1 = new Form1();
    Autodesk.AutoCAD.ApplicationServices.Application.ShowModelessDialog(null, tvf1, false);
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Khoa&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2012 20:56:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-restore-a-form-in-c/m-p/3691154#M52623</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-11-07T20:56:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to restore a form in C#</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-restore-a-form-in-c/m-p/3691162#M52624</link>
      <description>&lt;P&gt;You could store the form instances in a field, like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Form1 tvf1 = null;&lt;BR /&gt;private void closeButton_Click(object sender, EventArgs e)
{
    this.Close(); //Personally I would use this.Hide()&lt;BR /&gt;    //If tvf1 is not instantiated yet, do so
    if (tvf1 == null) {&lt;BR /&gt;        tvf1 = new Form1();
    }&lt;BR /&gt;    //And in any case, show tvf1
    Autodesk.AutoCAD.ApplicationServices.Application.ShowModelessDialog(null, tvf1, false);
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You might need to check if tvf1 is already visible too, I have not tested the above code and it's been a while since I've used subscreens. Hope it helped &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2012 21:03:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-restore-a-form-in-c/m-p/3691162#M52624</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-11-07T21:03:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to restore a form in C#</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-restore-a-form-in-c/m-p/3691232#M52625</link>
      <description>&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;Thanks for the suggestions but unfortunately i have not had any success with either.&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2012 21:39:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-restore-a-form-in-c/m-p/3691232#M52625</guid>
      <dc:creator>ezcad.co.uk</dc:creator>
      <dc:date>2012-11-07T21:39:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to restore a form in C#</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-restore-a-form-in-c/m-p/3691384#M52626</link>
      <description>&lt;P&gt;I re-read your topic and wrote a sample project and saw it’s quite simple. See the following code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AutoCAD command class:&lt;/P&gt;&lt;PRE&gt;using Autodesk.AutoCAD.Runtime;
namespace EzAbout
{
    public class Commands
    {
        [CommandMethod("EzAbout")]
        public static void EzAbout()
        {
            Form1 tvf1 = new Form1();
            Autodesk.AutoCAD.ApplicationServices.Application.ShowModelessDialog(null, tvf1, false);
        }
    }
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Form1:&lt;/P&gt;&lt;PRE&gt;using System;
using System.Windows.Forms;
namespace EzAbout
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Form2 tvf1 = new Form2();
            Autodesk.AutoCAD.ApplicationServices.Application.ShowModelessDialog(null, tvf1, false);
            this.Close();
        }
    }
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Form2:&lt;/P&gt;&lt;PRE&gt;using System.Windows.Forms;
namespace EzAbout
{
    public partial class Form2 : Form
    {
        public Form2()
        {
            InitializeComponent();
        }

        private void &lt;STRONG&gt;Form2_FormClosing&lt;/STRONG&gt;(object sender, FormClosingEventArgs e)
        {
            Autodesk.AutoCAD.ApplicationServices.Application.ShowModelessDialog(&lt;STRONG&gt;new Form1&lt;/STRONG&gt;());
        }
    }
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;This sample project can also be downloaded in the attachment. It’s tested for VS 2010, .NET 3.0, and A2009.&lt;BR /&gt;&lt;BR /&gt;-Khoa&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2012 23:58:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-restore-a-form-in-c/m-p/3691384#M52626</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-11-07T23:58:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to restore a form in C#</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-restore-a-form-in-c/m-p/3692868#M52627</link>
      <description>&lt;P&gt;Khoa,&lt;/P&gt;&lt;P&gt;Thank you so much.&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;</description>
      <pubDate>Thu, 08 Nov 2012 21:20:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-restore-a-form-in-c/m-p/3692868#M52627</guid>
      <dc:creator>ezcad.co.uk</dc:creator>
      <dc:date>2012-11-08T21:20:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to restore a form in C#</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-restore-a-form-in-c/m-p/3693278#M52628</link>
      <description>&lt;P&gt;Hi again,&lt;/P&gt;&lt;P&gt;I know I have previouslsy tagged this post as "resolved" but in testing it has thrown up another issue.&lt;/P&gt;&lt;P&gt;After implementing the code as described by Khoa, when&amp;nbsp;closing (the final display of) Form1 after Form2 &amp;amp; Form3 have been opened &amp;amp; closed, AutoCAD looses focus &amp;amp; the screen switches to the last application you were in, hiding AutoCAD.&lt;/P&gt;&lt;P&gt;So, this is what happens:&lt;/P&gt;&lt;P&gt;1. Start command - Form1 appears.&lt;/P&gt;&lt;P&gt;2. Click on button1 - Form1 closes &amp;amp; Form2 appears.&lt;/P&gt;&lt;P&gt;3. Click on Form2 (default) close button. Form2 closes &amp;amp; Form1 is restored.&lt;/P&gt;&lt;P&gt;4. Click on button2 - Form1 closes, (a brief flash of the screen) &amp;amp; Form3 appears.&lt;/P&gt;&lt;P&gt;5. Click on Form3 (default) close button. Form3 closes &amp;amp; Form1 is restored.&lt;/P&gt;&lt;P&gt;6. Click on Form1 (default) close button. Form1 closes &amp;amp; AutoCAD shifts focus to the previously view application.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The sample provided by Khoa also behaves in the same manner.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BTW I am testing on AuotCAD 2010, VSE2010 &amp;amp; Win XP Pro.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Steve.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Nov 2012 07:37:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-restore-a-form-in-c/m-p/3693278#M52628</guid>
      <dc:creator>ezcad.co.uk</dc:creator>
      <dc:date>2012-11-09T07:37:38Z</dc:date>
    </item>
  </channel>
</rss>

