<?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: Closing AutoCAD from VB.NET in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/closing-autocad-from-vb-net/m-p/4827537#M45634</link>
    <description>&lt;P&gt;Environment.Exit(0)&amp;nbsp; seems to work nicely, and I like the 'brute force' approach since the user no longer has valid use of the program if it reaches this point.&amp;nbsp; Thanks very much!&lt;/P&gt;</description>
    <pubDate>Thu, 20 Feb 2014 14:29:34 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-02-20T14:29:34Z</dc:date>
    <item>
      <title>Closing AutoCAD from VB.NET</title>
      <link>https://forums.autodesk.com/t5/net-forum/closing-autocad-from-vb-net/m-p/4787869#M45631</link>
      <description>&lt;P&gt;I am using VB.NET 2010 and AutoCAD OEM 2014 (though for Development I use regular AutoCAD 2014).&amp;nbsp; I run Visual Studio, and it opens AutoCAD automatically.&amp;nbsp; Then I NETLOAD my app, which opens a new vb.net form.&amp;nbsp; Then my user can draw different entitites onto the AutoCAD pallette.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Of course it's easy to close the VB form, but how can I close the full AutoCAD program programatically from my VB form?&amp;nbsp; I've tried AcadApp.Quit() from my VB form but it does nothing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The reason that this is important not to leave it to the user to close it is that I check for a valid license from VB, and if there is none, I don't want the user to be able to continue to use AutoCAD.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, what/where is the reference manual to find examples of using VB.NET and AutoCAD?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks in advance!&lt;/P&gt;&lt;P&gt;Mitch&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2014 20:22:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/closing-autocad-from-vb-net/m-p/4787869#M45631</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-31T20:22:16Z</dc:date>
    </item>
    <item>
      <title>Re: Closing AutoCAD from VB.NET</title>
      <link>https://forums.autodesk.com/t5/net-forum/closing-autocad-from-vb-net/m-p/4788903#M45632</link>
      <description>Handle Form_Closing event either for modal or modeless form:&lt;BR /&gt;      private void Form1_FormClosing(object sender, FormClosingEventArgs e)&lt;BR /&gt;        {&lt;BR /&gt;            Autodesk.AutoCAD.ApplicationServices.Application.Quit();&lt;BR /&gt;        }</description>
      <pubDate>Sat, 01 Feb 2014 11:14:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/closing-autocad-from-vb-net/m-p/4788903#M45632</guid>
      <dc:creator>Hallex</dc:creator>
      <dc:date>2014-02-01T11:14:39Z</dc:date>
    </item>
    <item>
      <title>Re: Closing AutoCAD from VB.NET</title>
      <link>https://forums.autodesk.com/t5/net-forum/closing-autocad-from-vb-net/m-p/4789055#M45633</link>
      <description>That will probably work 99% of the time except if autocad is stuck on some command. I think Environment.Exit(0) will "brute force" close it no matter what.</description>
      <pubDate>Sat, 01 Feb 2014 14:43:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/closing-autocad-from-vb-net/m-p/4789055#M45633</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-02-01T14:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: Closing AutoCAD from VB.NET</title>
      <link>https://forums.autodesk.com/t5/net-forum/closing-autocad-from-vb-net/m-p/4827537#M45634</link>
      <description>&lt;P&gt;Environment.Exit(0)&amp;nbsp; seems to work nicely, and I like the 'brute force' approach since the user no longer has valid use of the program if it reaches this point.&amp;nbsp; Thanks very much!&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2014 14:29:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/closing-autocad-from-vb-net/m-p/4827537#M45634</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-02-20T14:29:34Z</dc:date>
    </item>
  </channel>
</rss>

