<?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: .NET Form Controls Display Solid Black When App Runs Inside AutoCAD 2016 in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/net-form-controls-display-solid-black-when-app-runs-inside/m-p/8667613#M23207</link>
    <description>&lt;P&gt;Virupaksha,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks. Yes, I checked everything. (Or...at least...I thought I did!).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Before I read your post I stumbled across the solution. The Form's TransparencyKey property was set to Transparent:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Cap - Solution - 1 of 2.PNG" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/615444i7CDF9DF9AE9B22B7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screen Cap - Solution - 1 of 2.PNG" alt="Screen Cap - Solution - 1 of 2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The form that worked fine did &lt;STRONG&gt;&lt;EM&gt;not&lt;/EM&gt;&lt;/STRONG&gt; have this setting, it had the default TransparencyKey of White. Setting the problem form's TransparencyKey back to the default value...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Cap - Solution - 2 of 2.PNG" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/615449i6EAE4139712874D7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screen Cap - Solution - 2 of 2.PNG" alt="Screen Cap - Solution - 2 of 2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;...solved the problem:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Cap - Solution - 3 of 3.PNG" style="width: 271px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/615445i4716406C1343E71D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screen Cap - Solution - 3 of 3.PNG" alt="Screen Cap - Solution - 3 of 3.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks to all who replied. An object lesson, I think, than when you're checking form and control properties to check them &lt;EM&gt;&lt;STRONG&gt;all&lt;/STRONG&gt;&lt;/EM&gt;! &lt;img id="smileyvery-happy" class="emoticon emoticon-smileyvery-happy" src="https://forums.autodesk.com/i/smilies/16x16_smiley-very-happy.png" alt="Smiley Very Happy" title="Smiley Very Happy" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also an object lesson (...and note-to-self for future efforts...) that when an ObjectARX app uses a Windows.Forms.Form object with its TransparencyKey set to Transparent, weird things happen.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks again, and best regards to all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;--James G.&lt;/P&gt;</description>
    <pubDate>Tue, 19 Mar 2019 05:37:30 GMT</pubDate>
    <dc:creator>JamesDG1</dc:creator>
    <dc:date>2019-03-19T05:37:30Z</dc:date>
    <item>
      <title>.NET Form Controls Display Solid Black When App Runs Inside AutoCAD 2016</title>
      <link>https://forums.autodesk.com/t5/net-forum/net-form-controls-display-solid-black-when-app-runs-inside/m-p/8660525#M23203</link>
      <description>&lt;P&gt;I appreciate the help I've received in the past through this forum, and I have a new problem that has me vexed ;-)!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First:&lt;/P&gt;
&lt;P&gt;OS: Windows 10 x64&lt;/P&gt;
&lt;P&gt;AutoCAD: AutoCAD 2016 x64&lt;/P&gt;
&lt;P&gt;Development Environment: Visual Studio 2017&lt;/P&gt;
&lt;P&gt;AutoCAD managed code reference .dlls for AutoCAD 2016&lt;/P&gt;
&lt;P&gt;Target .NET Framework: 4.5&lt;/P&gt;
&lt;P&gt;Language: VB.Net&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a veeeery long term (read: very slow developing) project with multiple custom commands for AutoCAD that I am porting from VBA (where I've had good success over the years).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Late last fall I switched from developing in VS2012 to VS2017, per recommendations I received here, all to good effect. Recently, though (read: in the last two or three weeks), I've been seeing a very strange behavior when I start Debug mode (F5) from VS. AutoCAD starts up fine, NETLOAD loads my just-now-newly built .dll fine, but when I run one of my custom commands I see this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Cap - Running.PNG" style="width: 428px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/614160i92586F514795E12E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Cap - Running.PNG" alt="Screen Cap - Running.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Meanhwile, back in Visual Studio, the Form Designer looks like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Cap - Developing.PNG" style="width: 445px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/614161iA9D9961A5D7FD3FD/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Cap - Developing.PNG" alt="Screen Cap - Developing.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am using all standard Windows.Forms.Controls object types, but TextBoxes and RadioButtons especially appear with solid black backgrounds and exaggerated black borders, and TextBox text is barely discernible unless selected. None of this bodes well for UI usability.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not long before all this started happening, I spent time experimenting with a custom control derived from Windows.Forms.Label that would paint a colored gradient background inside the Label's borders, and would also paint a contrasting color drop shadow for the Label's .Text property. I accomplished this with a custom OnPaint event handler, all per directions and discussions I read in numerous places on the general subject of deriving custom controls from built-in .NET Windows.Forms controls...and as far as I can tell, none of which should have had an effect of any kind on anything else in the app.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have since removed both the custom Label control and the references to its .dll from my project, thinking there may have been a connection. Alas, I still have the goofy dialog box display from inside AutoCAD. Weirder still, &lt;EM&gt;another&lt;/EM&gt; of my custom command dialogs shows a similar issue, while a third one displays just fine! None of the form displays in their VS designer windows show any problems.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Skipping for the moment the visible differences in formatting of the dialog window's borders and title bar between the IDE/Designer rendering and that inside AutoCAD, the closet thing I've had so far to what feels intuitively like an approach is something to do with (...I dunno...) a difference between the IDE and running AutoCAD in where the called code for control objects exists (...should all be the same .NET objects...right?). Maybe there's a setting somewhere in Visual Studio that I changed inadvertently...again, I just do not know.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;At this point, I'm not even sure just what questions to ask, so any and all help will be appreciated. And I will do my best to answer questions that anyone believes may help illuminate the problem and/or a solution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance, and best regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;--James G.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2019 02:28:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/net-form-controls-display-solid-black-when-app-runs-inside/m-p/8660525#M23203</guid>
      <dc:creator>JamesDG1</dc:creator>
      <dc:date>2019-03-15T02:28:25Z</dc:date>
    </item>
    <item>
      <title>Re: .NET Form Controls Display Solid Black When App Runs Inside AutoCAD 2016</title>
      <link>https://forums.autodesk.com/t5/net-forum/net-form-controls-display-solid-black-when-app-runs-inside/m-p/8660681#M23204</link>
      <description>&lt;P&gt;Is it possible that your custom control experiments could have unintentionally altered the properties of other controls on the form? Are you using Version Control? Can you roll back the project to the point before you introduce the custom control to see if the problem exists there as well?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The fact that the problem appears only when running and not in the IDE suggest that an event handler is responsible&amp;nbsp;because they don't run in the IDE.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2019 06:32:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/net-form-controls-display-solid-black-when-app-runs-inside/m-p/8660681#M23204</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2019-03-15T06:32:16Z</dc:date>
    </item>
    <item>
      <title>Re: .NET Form Controls Display Solid Black When App Runs Inside AutoCAD 2016</title>
      <link>https://forums.autodesk.com/t5/net-forum/net-form-controls-display-solid-black-when-app-runs-inside/m-p/8663489#M23205</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4476837"&gt;@ActivistInvestor&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Is it possible that your custom control experiments could have unintentionally altered the properties of other controls on the form? Are you using Version Control? Can you roll back the project to the point before you introduce the custom control to see if the problem exists there as well?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; The fact that the problem appears only when running and not in the IDE suggest that an event handler is responsible&amp;nbsp;because they don't run in the IDE.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm certain no other control properties were altered--I went over all of them pretty thoroughly. And no, I do not use version control (...maybe I should?...a separate topic, though...).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This dialog as yet has no event handlers, other than what are buried in the controls themselves, so not directly accessible.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Other reading/searching I've done suggests a possibility of something altered in the project manifest file, but again, I have no idea where or what to look for.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the reply!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;--James G.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Mar 2019 20:21:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/net-form-controls-display-solid-black-when-app-runs-inside/m-p/8663489#M23205</guid>
      <dc:creator>JamesDG1</dc:creator>
      <dc:date>2019-03-16T20:21:19Z</dc:date>
    </item>
    <item>
      <title>Re: .NET Form Controls Display Solid Black When App Runs Inside AutoCAD 2016</title>
      <link>https://forums.autodesk.com/t5/net-forum/net-form-controls-display-solid-black-when-app-runs-inside/m-p/8664734#M23206</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;do you have any other forms in the module? what are their behavior? if other forms are working fine, please go through the source of the form which is giving issue to see code has any reference to background color...or any other code from custom control you tried.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Mar 2019 05:46:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/net-form-controls-display-solid-black-when-app-runs-inside/m-p/8664734#M23206</guid>
      <dc:creator>Virupaksha_aithal</dc:creator>
      <dc:date>2019-03-18T05:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: .NET Form Controls Display Solid Black When App Runs Inside AutoCAD 2016</title>
      <link>https://forums.autodesk.com/t5/net-forum/net-form-controls-display-solid-black-when-app-runs-inside/m-p/8667613#M23207</link>
      <description>&lt;P&gt;Virupaksha,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks. Yes, I checked everything. (Or...at least...I thought I did!).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Before I read your post I stumbled across the solution. The Form's TransparencyKey property was set to Transparent:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Cap - Solution - 1 of 2.PNG" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/615444i7CDF9DF9AE9B22B7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screen Cap - Solution - 1 of 2.PNG" alt="Screen Cap - Solution - 1 of 2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The form that worked fine did &lt;STRONG&gt;&lt;EM&gt;not&lt;/EM&gt;&lt;/STRONG&gt; have this setting, it had the default TransparencyKey of White. Setting the problem form's TransparencyKey back to the default value...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Cap - Solution - 2 of 2.PNG" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/615449i6EAE4139712874D7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screen Cap - Solution - 2 of 2.PNG" alt="Screen Cap - Solution - 2 of 2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;...solved the problem:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Cap - Solution - 3 of 3.PNG" style="width: 271px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/615445i4716406C1343E71D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screen Cap - Solution - 3 of 3.PNG" alt="Screen Cap - Solution - 3 of 3.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks to all who replied. An object lesson, I think, than when you're checking form and control properties to check them &lt;EM&gt;&lt;STRONG&gt;all&lt;/STRONG&gt;&lt;/EM&gt;! &lt;img id="smileyvery-happy" class="emoticon emoticon-smileyvery-happy" src="https://forums.autodesk.com/i/smilies/16x16_smiley-very-happy.png" alt="Smiley Very Happy" title="Smiley Very Happy" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also an object lesson (...and note-to-self for future efforts...) that when an ObjectARX app uses a Windows.Forms.Form object with its TransparencyKey set to Transparent, weird things happen.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks again, and best regards to all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;--James G.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2019 05:37:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/net-form-controls-display-solid-black-when-app-runs-inside/m-p/8667613#M23207</guid>
      <dc:creator>JamesDG1</dc:creator>
      <dc:date>2019-03-19T05:37:30Z</dc:date>
    </item>
  </channel>
</rss>

