- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi All,
Visual Lisper trying to migrate to .net!
Can anyone please provide an example of how to restore a form?
I have an "about" project which contains 3 forms.
Form1 is displayed by default when the command is called...it contains two buttons which both close form1 & open form2 or form3. What I would like to happen is that when form2 or form3 is closed, form1 will be restored.
This is the code which defines the command & shows form1:
<code begins>
[CommandMethod("EzAbout")]
public void EzAbout()
{
Form1tvf1;
tvf1 = newForm1();
Autodesk.AutoCAD.ApplicationServices.Application.ShowModelessDialog(null, tvf1, false);
}
<code ends>
This is the code from the button on form1:
<code begins>
private void button1_Click_1(object sender, EventArgs e)
{
this.Close();
Form2 tvf2;
tvf2 = new Form2();
Autodesk.AutoCAD.ApplicationServices.Application.ShowModelessDialog(null, tvf2, false);
}
<code ends>
This is the code behind the close button on form2...trying to restore form1 (it closes form2 but does not restore form1)
<code begins>
private void closeButton_Click(object sender, EventArgs e)
{
this.Close();
Form1 tvf1;
tvf1 = new Form1();
Autodesk.AutoCAD.ApplicationServices.Application.ShowModelessDialog(null, tvf1, false);
}
<code ends>
Any guidance would be greatly appreciated.
Thanks in advance.
Steve
Solved! Go to Solution.