{"id":3655,"date":"2014-03-29T07:36:01","date_gmt":"2014-03-29T07:36:01","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/29\/winform-button-on-a-black-background-appears-invisible-with-visual-styles-disabled-collection-of-common-programming-errors\/"},"modified":"2014-03-29T07:36:01","modified_gmt":"2014-03-29T07:36:01","slug":"winform-button-on-a-black-background-appears-invisible-with-visual-styles-disabled-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/29\/winform-button-on-a-black-background-appears-invisible-with-visual-styles-disabled-collection-of-common-programming-errors\/","title":{"rendered":"WinForm Button on a black background appears invisible with Visual Styles disabled-Collection of common programming errors"},"content":{"rendered":"<p>I know this is an old post, but in case someone else comes across it, I managed to solve the issue in my program. In your <code>Program.cs<\/code> page (or whatever it&#8217;s been renamed to), ensure you&#8217;ve called Application.EnableVisualStyles before calling <code>Run<\/code>.<\/p>\n<pre><code>Application.EnableVisualStyles();\nApplication.Run(new Form1());\n<\/code><\/pre>\n<p>Also ensure that the button&#8217;s <code>UseVisualStyleBackColor<\/code> property is set to <code>true<\/code>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I know this is an old post, but in case someone else comes across it, I managed to solve the issue in my program. In your Program.cs page (or whatever it&#8217;s been renamed to), ensure you&#8217;ve called Application.EnableVisualStyles before calling Run. Application.EnableVisualStyles(); Application.Run(new Form1()); Also ensure that the button&#8217;s UseVisualStyleBackColor property is set to true.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3655","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3655","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=3655"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3655\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=3655"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=3655"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=3655"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}