<?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: Main form does not show up in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/main-form-does-not-show-up/m-p/2802752#M63394</link>
    <description>&lt;P&gt;Modal form? lucky you that you did not set the form's "ShowOnTaskBar" to False, so that you can tell that the form is actually shown, but simply not seeable due to its off-screen position.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By Windows tridition, Modal dialog box should not ne shown in task bar. In this case, once the the form is shown (off sceen), AutoCAD looks like frozen to unsuspected user. The first time I ran into this was in one of my office demo of one of my first .NET App for Acad2006: I tested my demo with at my desk with 2 screens and I show the form on the other screen and closed it there. Then when my computer connected to a projector (one screen, of course). Once I run my command, AutoCAD mystically frozen. How embarrassed was I then one can imagine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now yo can easily move the form back to your main screen with this steps (right after your form shows; Do not use mouse click anywhere):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Hold down &lt;STRONG&gt;Alt&lt;/STRONG&gt; + &lt;STRONG&gt;Spacebar&lt;/STRONG&gt;&lt;BR /&gt;2. Press the &lt;STRONG&gt;M&lt;/STRONG&gt; key&lt;BR /&gt;3. Use the arrow keys to relocate the window&lt;BR /&gt;4. Press the &lt;STRONG&gt;Enter&lt;/STRONG&gt; key when you have the Window in the desired location.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 20 Oct 2010 19:20:09 GMT</pubDate>
    <dc:creator>norman.yuan</dc:creator>
    <dc:date>2010-10-20T19:20:09Z</dc:date>
    <item>
      <title>Main form does not show up</title>
      <link>https://forums.autodesk.com/t5/net-forum/main-form-does-not-show-up/m-p/2802224#M63389</link>
      <description>&lt;P&gt;&lt;FONT size="2"&gt;I have an application I developed using vb.net.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Up until yesterday afternoon, my application was loading and showing&amp;nbsp;correctly.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;I don't know if I changed a setting in AutoCAD but my application's main form doesn't show anymore (it was working fine and it just suddenly stopped showing).&amp;nbsp; I can see it in the task bar but it cannot get focus anymore (I get Me.CanFocus = False when the form loads).&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;This happend in the same work session.&amp;nbsp; I did not close AutoCAD, that is why I think I changed an AutoCAD parameter without noticing.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Any idea?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Thanks&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Louis&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Oct 2010 14:52:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/main-form-does-not-show-up/m-p/2802224#M63389</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-10-20T14:52:27Z</dc:date>
    </item>
    <item>
      <title>Re: Main form does not show up</title>
      <link>https://forums.autodesk.com/t5/net-forum/main-form-does-not-show-up/m-p/2802234#M63390</link>
      <description>&lt;P&gt;&lt;FONT size="2"&gt;I forgot to mention that if I maximise the form I can see it.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;I did a few more tests.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;- I loaded an other application I wrote and it worked fine&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;- I loaded an old version (compiled a few months ago) of the application that is not working and it did not work.&amp;nbsp; The main form of both version of the program have the same name.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Oct 2010 15:20:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/main-form-does-not-show-up/m-p/2802234#M63390</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-10-20T15:20:21Z</dc:date>
    </item>
    <item>
      <title>Re: Main form does not show up</title>
      <link>https://forums.autodesk.com/t5/net-forum/main-form-does-not-show-up/m-p/2802290#M63391</link>
      <description>&lt;P&gt;&lt;FONT size="2"&gt;That's weird...&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;I changed the name of the form and now, it shows correctly.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;If I rename it back to it's original name, it doesn't show.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Any idea?&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Oct 2010 15:29:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/main-form-does-not-show-up/m-p/2802290#M63391</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-10-20T15:29:55Z</dc:date>
    </item>
    <item>
      <title>Re: Main form does not show up</title>
      <link>https://forums.autodesk.com/t5/net-forum/main-form-does-not-show-up/m-p/2802724#M63392</link>
      <description>&lt;P&gt;What kind of form is it? Modal? Modeless? Or PaletteSet? Do you use&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Autodesk.AutoCAD.ApplicationServices.Application.ShowModalDialog()/ShowModelessDialog() to show the form? If yes, it may be that the form's location remebered by AutoCAD&amp;nbsp;was off screen when it was closed last time. This kind of thing happens often when one use a laptop, move around and connect to different Monitor(s).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AutoCAD thinks it does a good job to remeber form/dialog box's location when ShowModelessDialog()/ShowModalDialog() method is used, but when AutoCAD tries to place a form back to remebered location, it should have checked whether the rememberd location is off screen or not. How difficult&amp;nbsp;could that be?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Oct 2010 19:03:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/main-form-does-not-show-up/m-p/2802724#M63392</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2010-10-20T19:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: Main form does not show up</title>
      <link>https://forums.autodesk.com/t5/net-forum/main-form-does-not-show-up/m-p/2802732#M63393</link>
      <description>&lt;P&gt;Modal&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's possibly what is happening but I have only 1 monitor and I'm not using a laptop.&lt;/P&gt;&lt;P&gt;Is there a way to make AutoCAD forget the form location?&lt;/P&gt;&lt;P&gt;I tried to fix the location (10,10) of the form when it loads but it doesn't work.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Oct 2010 19:14:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/main-form-does-not-show-up/m-p/2802732#M63393</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-10-20T19:14:19Z</dc:date>
    </item>
    <item>
      <title>Re: Main form does not show up</title>
      <link>https://forums.autodesk.com/t5/net-forum/main-form-does-not-show-up/m-p/2802752#M63394</link>
      <description>&lt;P&gt;Modal form? lucky you that you did not set the form's "ShowOnTaskBar" to False, so that you can tell that the form is actually shown, but simply not seeable due to its off-screen position.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By Windows tridition, Modal dialog box should not ne shown in task bar. In this case, once the the form is shown (off sceen), AutoCAD looks like frozen to unsuspected user. The first time I ran into this was in one of my office demo of one of my first .NET App for Acad2006: I tested my demo with at my desk with 2 screens and I show the form on the other screen and closed it there. Then when my computer connected to a projector (one screen, of course). Once I run my command, AutoCAD mystically frozen. How embarrassed was I then one can imagine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now yo can easily move the form back to your main screen with this steps (right after your form shows; Do not use mouse click anywhere):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Hold down &lt;STRONG&gt;Alt&lt;/STRONG&gt; + &lt;STRONG&gt;Spacebar&lt;/STRONG&gt;&lt;BR /&gt;2. Press the &lt;STRONG&gt;M&lt;/STRONG&gt; key&lt;BR /&gt;3. Use the arrow keys to relocate the window&lt;BR /&gt;4. Press the &lt;STRONG&gt;Enter&lt;/STRONG&gt; key when you have the Window in the desired location.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Oct 2010 19:20:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/main-form-does-not-show-up/m-p/2802752#M63394</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2010-10-20T19:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: Main form does not show up</title>
      <link>https://forums.autodesk.com/t5/net-forum/main-form-does-not-show-up/m-p/2802792#M63395</link>
      <description>&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;P&gt;I was able to move my form back in the screen &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Oct 2010 19:38:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/main-form-does-not-show-up/m-p/2802792#M63395</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-10-20T19:38:29Z</dc:date>
    </item>
    <item>
      <title>How to make sure modal dialogues are on the screen</title>
      <link>https://forums.autodesk.com/t5/net-forum/main-form-does-not-show-up/m-p/2966978#M63396</link>
      <description>&lt;P&gt;I got sick of AutoCAD managing window positions regardless of whether there is a screen for the window to display on or not. AutoCAD doesn't check for that - like it doesn't check for Nulls on method inputs but don't get me started on that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ShowModalDialogue&lt;/STRONG&gt; can have a property for AutoCAD to persist the postion. It sucks. Don't use it. Set it to false. You can't overwrite the window position once AutoCAD has control over it, so you can't move the window back onto the visisble screen after you undock your laptop or whatever it is you did to make some screen real estate go away.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's how I got around it ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I added 2 integers to the settings file,&amp;nbsp;WindowLocationX &amp;amp;&amp;nbsp;WindowLocationY and set them to a nominal 100 each so the first run doesn't blow up.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I added this to the Window_Shown event to recall the saved location ...&lt;/P&gt;&lt;PRE&gt;			&lt;SPAN&gt;int&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;x&lt;/SPA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&gt;Bounds&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Contains&lt;/SPAN&gt;(&lt;SPAN&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Location&lt;/SPAN&gt;))
			{
				&lt;SPAN&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;DesktopLocation&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;=&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;new&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;Point&lt;/SPAN&gt;(&lt;SPAN&gt;100&lt;/SPAN&gt;,&lt;SPAN&gt;100&lt;/SPAN&gt;);
			}&lt;/PRE&gt;&lt;P&gt;... the last bit there will move it top top-left-ish if it opens out of bounds.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I added this to the window closing event to save the location&lt;/P&gt;&lt;PRE&gt;		&lt;SPAN&gt;private&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;void&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;UpdateLocationInSettings&lt;/SPAN&gt;(&lt;SPAN&gt;object&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;sender&lt;/SPAN&gt;,&amp;nbsp;&lt;SPAN&gt;FormClosingEventArgs&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;e&lt;/SPAN&gt;)
		{
			&lt;SPAN&gt;Settings&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Default&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;WindowLocationX&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;=&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;Location&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;X&lt;/SPAN&gt;;
			&lt;SPAN&gt;Settings&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Default&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;WindowLocationY&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;=&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;Location&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Y&lt;/SPAN&gt;;
		}&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Mar 2011 03:38:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/main-form-does-not-show-up/m-p/2966978#M63396</guid>
      <dc:creator>CADbloke</dc:creator>
      <dc:date>2011-03-28T03:38:49Z</dc:date>
    </item>
  </channel>
</rss>

