<?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 Centre form in AutoCAD Window in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/centre-form-in-autocad-window/m-p/5404879#M42177</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I&amp;nbsp;position&amp;nbsp;a form in the center of the AutoCAD&amp;nbsp;application?&lt;/P&gt;&lt;P&gt;Often users have two monitor screens and the form&amp;nbsp;loads in the primrary&amp;nbsp;screen instead of the one they are using.&lt;/P&gt;</description>
    <pubDate>Fri, 14 Nov 2014 18:06:44 GMT</pubDate>
    <dc:creator>SRSDS</dc:creator>
    <dc:date>2014-11-14T18:06:44Z</dc:date>
    <item>
      <title>Centre form in AutoCAD Window</title>
      <link>https://forums.autodesk.com/t5/net-forum/centre-form-in-autocad-window/m-p/5404879#M42177</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I&amp;nbsp;position&amp;nbsp;a form in the center of the AutoCAD&amp;nbsp;application?&lt;/P&gt;&lt;P&gt;Often users have two monitor screens and the form&amp;nbsp;loads in the primrary&amp;nbsp;screen instead of the one they are using.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Nov 2014 18:06:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/centre-form-in-autocad-window/m-p/5404879#M42177</guid>
      <dc:creator>SRSDS</dc:creator>
      <dc:date>2014-11-14T18:06:44Z</dc:date>
    </item>
    <item>
      <title>Re: Centre form in AutoCAD Window</title>
      <link>https://forums.autodesk.com/t5/net-forum/centre-form-in-autocad-window/m-p/5405037#M42178</link>
      <description>&lt;P&gt;It depends. &amp;nbsp;What type of form is it? &amp;nbsp;Do you need user input other than Yes / No?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="http://msdn.microsoft.com/en-CA/library/aa984358(v=vs.71).aspx"&gt;http://msdn.microsoft.com/en-CA/library/aa984358(v=vs.71).aspx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="http://msdn.microsoft.com/en-us/library/aa984420(v=vs.71).aspx"&gt;http://msdn.microsoft.com/en-us/library/aa984420(v=vs.71).aspx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Nov 2014 19:10:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/centre-form-in-autocad-window/m-p/5405037#M42178</guid>
      <dc:creator>fieldguy</dc:creator>
      <dc:date>2014-11-14T19:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: Centre form in AutoCAD Window</title>
      <link>https://forums.autodesk.com/t5/net-forum/centre-form-in-autocad-window/m-p/5405069#M42179</link>
      <description>&lt;P&gt;A modal form but the problem is that I would like&amp;nbsp;to show the form on the&amp;nbsp;monitor that AutoCAD appears on.&lt;/P&gt;&lt;P&gt;ShowModalDialog and&amp;nbsp;ShowModelessDialog both show the form on the primary screen. and not the &amp;nbsp;screen that AutoCAD&amp;nbsp;appears on.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Nov 2014 19:20:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/centre-form-in-autocad-window/m-p/5405069#M42179</guid>
      <dc:creator>SRSDS</dc:creator>
      <dc:date>2014-11-14T19:20:40Z</dc:date>
    </item>
    <item>
      <title>Re: Centre form in AutoCAD Window</title>
      <link>https://forums.autodesk.com/t5/net-forum/centre-form-in-autocad-window/m-p/5405367#M42180</link>
      <description>&lt;P&gt;Try the windows form showdialog like this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;myform.StartPosition = FormStartPosition.CenterParent;&lt;BR /&gt;myform.ShowDialog();&lt;/P&gt;</description>
      <pubDate>Fri, 14 Nov 2014 20:51:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/centre-form-in-autocad-window/m-p/5405367#M42180</guid>
      <dc:creator>fieldguy</dc:creator>
      <dc:date>2014-11-14T20:51:41Z</dc:date>
    </item>
    <item>
      <title>Re: Centre form in AutoCAD Window</title>
      <link>https://forums.autodesk.com/t5/net-forum/centre-form-in-autocad-window/m-p/5405475#M42181</link>
      <description>&lt;P&gt;Dialog box in AutoCAD should be shown using Application.ShowModal[Modeless]Dialog(), rather than Windows.Forms.Form.Show()/ShowDialog().&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Application.ShowModal[Modeless]Dialog() has 3 overrides, unless you use the one that has &amp;nbsp;a third boolean argument being false, AutoCAD will remember the dialog box's position when it closes, and show at the same position next time the dialog box is called up.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If&amp;nbsp;you need to write code to position the dialog box, you can have code in Form's Shown event handler to set form's position regardless if AutoCAD remember the form previous position or not.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use Widows.Forms.Screen class to iterate through all screens and find primary screen. You can also use Application.MainWindow to find out main AutoCAD window's size/location. With all this information in hand, you can then place your dialog box at the position you want.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Nov 2014 21:58:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/centre-form-in-autocad-window/m-p/5405475#M42181</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2014-11-14T21:58:33Z</dc:date>
    </item>
  </channel>
</rss>

