<?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: DialogPlugin Closing Event in AutoCAD Map 3D Developer Forum</title>
    <link>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/dialogplugin-closing-event/m-p/5741364#M1344</link>
    <description>&lt;P&gt;Hi Alfred,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to control the behaviour of an industry model feature class form. I think I need to use a DialogPlugin inheritance.&lt;/P&gt;&lt;P&gt;The DialogPlugin is initialized by Map for this form, I have its definition on the tbp file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;lt;DialogPlugIn ClassName="&lt;SPAN&gt;TestDLG&amp;nbsp;&lt;/SPAN&gt;" Name="MY_FEATURE_CLASS" /&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your help is appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 27 Jul 2015 07:30:12 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-07-27T07:30:12Z</dc:date>
    <item>
      <title>DialogPlugin Closing Event</title>
      <link>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/dialogplugin-closing-event/m-p/5737949#M1338</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I need to avoid a Dialog to be closed if there is no some attributes correctly informed.&lt;/P&gt;&lt;P&gt;Tricking with the ModeChanging events I can control if the Cancel button is pressed, but if the dialog is forced to be closed with the native (X) close form button, I cannot prevent it to close.&lt;/P&gt;&lt;P&gt;I have tried to do a Me.Dialog.Show() in the Closing event but the dialog closes anyway.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas on how to avoid to close or how to re open it again?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Francisco J. Barrero&lt;/P&gt;&lt;P&gt;GIS Developer&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jul 2015 16:39:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/dialogplugin-closing-event/m-p/5737949#M1338</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-07-23T16:39:13Z</dc:date>
    </item>
    <item>
      <title>Re: DialogPlugin Closing Event</title>
      <link>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/dialogplugin-closing-event/m-p/5738817#M1339</link>
      <description>&lt;P&gt;Hi Francisco,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;have your tried this in the closing event routine:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;e.Cancel = &lt;SPAN style="color: blue;"&gt;true&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MSDN:&lt;/P&gt;&lt;P&gt;&lt;A href="https://msdn.microsoft.com/en-us/library/system.windows.forms.form.closing(v=vs.110).aspx" target="_blank"&gt;https://msdn.microsoft.com/en-us/library/system.windows.forms.form.closing(v=vs.110).aspx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jul 2015 06:26:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/dialogplugin-closing-event/m-p/5738817#M1339</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-07-24T06:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: DialogPlugin Closing Event</title>
      <link>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/dialogplugin-closing-event/m-p/5738867#M1340</link>
      <description>&lt;P&gt;Hi Robert,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That was my idea on the first time.&lt;/P&gt;&lt;P&gt;But the DialogPlugin Closing event receives EventArgs insted CancelEventArgs.&lt;/P&gt;&lt;P&gt;I have even tried a conversion to CancelEventArgs but the point is that the "e" parameter is nothing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any other ideas? &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jul 2015 07:25:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/dialogplugin-closing-event/m-p/5738867#M1340</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-07-24T07:25:37Z</dc:date>
    </item>
    <item>
      <title>Re: DialogPlugin Closing Event</title>
      <link>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/dialogplugin-closing-event/m-p/5738927#M1341</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I also think "e.Cancel = True" should do the trick.&lt;/P&gt;
&lt;P&gt;If you get any other events when the X-button is pressed that this might depend more in the initialization- or form-loading code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would suggest you create a minimalistic project, just one (empty) form, the loading within AutoCAD and if that happens again with that code then upload the solution here and we will take a look into it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- alfred -&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jul 2015 08:21:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/dialogplugin-closing-event/m-p/5738927#M1341</guid>
      <dc:creator>Alfred.NESWADBA</dc:creator>
      <dc:date>2015-07-24T08:21:50Z</dc:date>
    </item>
    <item>
      <title>Re: DialogPlugin Closing Event</title>
      <link>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/dialogplugin-closing-event/m-p/5739056#M1342</link>
      <description>&lt;P&gt;The source code is quite simple, note that it's a DialogPlugin not a DocumentPlugin:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Imports Autodesk.Map.IM.Data&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Imports Autodesk.Map.IM.Forms&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Imports System.ComponentModel&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Public Class TestDLG&amp;nbsp;Inherits Autodesk.Map.IM.Forms.DialogPlugIn&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Private Sub BaixaDLG_Closing(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Closing&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; 'e.Cancel()&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; 'CType(e, System.ComponentModel.CancelEventArgs).Cancel()&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;End Sub&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;End Class&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First commented Cancel fails since e is not a&amp;nbsp;&lt;SPAN&gt;System.ComponentModel.CancelEventArgs&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Segon commented Cancel fails since e is nothing when the event fires.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps to put some light on the solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jul 2015 11:34:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/dialogplugin-closing-event/m-p/5739056#M1342</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-07-24T11:34:10Z</dc:date>
    </item>
    <item>
      <title>Re: DialogPlugin Closing Event</title>
      <link>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/dialogplugin-closing-event/m-p/5739150#M1343</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it necessary to use the IM.xx.DialogPlugin inheritance? If possible can you work with default Windows Forms?&lt;/P&gt;
&lt;P&gt;When/how/what code do you use to initialize and show the dialog?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- alfred -&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jul 2015 12:52:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/dialogplugin-closing-event/m-p/5739150#M1343</guid>
      <dc:creator>Alfred.NESWADBA</dc:creator>
      <dc:date>2015-07-24T12:52:48Z</dc:date>
    </item>
    <item>
      <title>Re: DialogPlugin Closing Event</title>
      <link>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/dialogplugin-closing-event/m-p/5741364#M1344</link>
      <description>&lt;P&gt;Hi Alfred,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to control the behaviour of an industry model feature class form. I think I need to use a DialogPlugin inheritance.&lt;/P&gt;&lt;P&gt;The DialogPlugin is initialized by Map for this form, I have its definition on the tbp file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;lt;DialogPlugIn ClassName="&lt;SPAN&gt;TestDLG&amp;nbsp;&lt;/SPAN&gt;" Name="MY_FEATURE_CLASS" /&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your help is appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jul 2015 07:30:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/dialogplugin-closing-event/m-p/5741364#M1344</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-07-27T07:30:12Z</dc:date>
    </item>
  </channel>
</rss>

