Visual Studio VB winform style/theme changed? Texbox now has dropshadow?










0















I have a winform project I have been writing for 10 years. I'm using VS2010.



Today the style of the buttons checkbox, groupbox and DGVborders have changed to a square dropshadow style.



In the IDE I have:



https://i.stack.imgur.com/0be6K.jpg



When debugging or publish the style changed to this:



https://i.stack.imgur.com/96EZY.jpg



I checked the Application.EnableVisualStyles per:
WinForms button default style changed?



I'm sure I accidentally changed a setting or codeline, but I can't seem to find where.
Any insight is appreciated



EDIT:
It almost looks like it has something to do with a Windows update? Computers that have not been restarted do not have this issue.










share|improve this question



















  • 1





    Project Properties -> Application -> Enable XP visual styles (if you don't have a Sub Main, otherwise in the module where Sub Main() is).

    – Jimi
    Nov 14 '18 at 16:01












  • Thanks Jim, I did have XP visual styles enabled and tried adding Application.EnableVisualStyles() to the startup as well.

    – gcronin774
    Nov 15 '18 at 17:11











  • What startup? VB.Net doesn't have a Program.vb, unless you make one disabling the Application FrameWork. Then you can start your program from a Sub Main(). Did you do this? You can't have both. A Sub Main() and the Enable XP visual styles option available. Which is it? If you have a Sub Main() in Program.vb, then you need to set both Application.EnableVisualStyles() and Application.SetCompatibleTextRenderingDefault(False) there, before you initialize MainForm.

    – Jimi
    Nov 15 '18 at 21:12












  • Thanks again Jim, Sorry for the confusion. I have a form named FORMstartup.vb that is the Startup form. I do not have a Sub Main() in a module. I tried to put Application.EnableVisualStyles() in the FORMstart_Load, just to see if it would change anything and it did not.

    – gcronin774
    Nov 16 '18 at 22:09











  • It's too late at that point. That mode must be set in the entry point of your application, before any UI element is created. Before a Form's constructor is initialized. At run-time you could have used Application.VisualStyleState = VisualStyleState.NoneEnabled (but this requires a reference to System.Windows.Forms.VisualStyles, you should know you have used this) or called SetWindowTheme with the wrong parameters.

    – Jimi
    Nov 16 '18 at 22:48















0















I have a winform project I have been writing for 10 years. I'm using VS2010.



Today the style of the buttons checkbox, groupbox and DGVborders have changed to a square dropshadow style.



In the IDE I have:



https://i.stack.imgur.com/0be6K.jpg



When debugging or publish the style changed to this:



https://i.stack.imgur.com/96EZY.jpg



I checked the Application.EnableVisualStyles per:
WinForms button default style changed?



I'm sure I accidentally changed a setting or codeline, but I can't seem to find where.
Any insight is appreciated



EDIT:
It almost looks like it has something to do with a Windows update? Computers that have not been restarted do not have this issue.










share|improve this question



















  • 1





    Project Properties -> Application -> Enable XP visual styles (if you don't have a Sub Main, otherwise in the module where Sub Main() is).

    – Jimi
    Nov 14 '18 at 16:01












  • Thanks Jim, I did have XP visual styles enabled and tried adding Application.EnableVisualStyles() to the startup as well.

    – gcronin774
    Nov 15 '18 at 17:11











  • What startup? VB.Net doesn't have a Program.vb, unless you make one disabling the Application FrameWork. Then you can start your program from a Sub Main(). Did you do this? You can't have both. A Sub Main() and the Enable XP visual styles option available. Which is it? If you have a Sub Main() in Program.vb, then you need to set both Application.EnableVisualStyles() and Application.SetCompatibleTextRenderingDefault(False) there, before you initialize MainForm.

    – Jimi
    Nov 15 '18 at 21:12












  • Thanks again Jim, Sorry for the confusion. I have a form named FORMstartup.vb that is the Startup form. I do not have a Sub Main() in a module. I tried to put Application.EnableVisualStyles() in the FORMstart_Load, just to see if it would change anything and it did not.

    – gcronin774
    Nov 16 '18 at 22:09











  • It's too late at that point. That mode must be set in the entry point of your application, before any UI element is created. Before a Form's constructor is initialized. At run-time you could have used Application.VisualStyleState = VisualStyleState.NoneEnabled (but this requires a reference to System.Windows.Forms.VisualStyles, you should know you have used this) or called SetWindowTheme with the wrong parameters.

    – Jimi
    Nov 16 '18 at 22:48













0












0








0








I have a winform project I have been writing for 10 years. I'm using VS2010.



Today the style of the buttons checkbox, groupbox and DGVborders have changed to a square dropshadow style.



In the IDE I have:



https://i.stack.imgur.com/0be6K.jpg



When debugging or publish the style changed to this:



https://i.stack.imgur.com/96EZY.jpg



I checked the Application.EnableVisualStyles per:
WinForms button default style changed?



I'm sure I accidentally changed a setting or codeline, but I can't seem to find where.
Any insight is appreciated



EDIT:
It almost looks like it has something to do with a Windows update? Computers that have not been restarted do not have this issue.










share|improve this question
















I have a winform project I have been writing for 10 years. I'm using VS2010.



Today the style of the buttons checkbox, groupbox and DGVborders have changed to a square dropshadow style.



In the IDE I have:



https://i.stack.imgur.com/0be6K.jpg



When debugging or publish the style changed to this:



https://i.stack.imgur.com/96EZY.jpg



I checked the Application.EnableVisualStyles per:
WinForms button default style changed?



I'm sure I accidentally changed a setting or codeline, but I can't seem to find where.
Any insight is appreciated



EDIT:
It almost looks like it has something to do with a Windows update? Computers that have not been restarted do not have this issue.







vb.net winforms visual-studio-2010 datagridview themes






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 15 '18 at 17:13







gcronin774

















asked Nov 14 '18 at 15:44









gcronin774gcronin774

11




11







  • 1





    Project Properties -> Application -> Enable XP visual styles (if you don't have a Sub Main, otherwise in the module where Sub Main() is).

    – Jimi
    Nov 14 '18 at 16:01












  • Thanks Jim, I did have XP visual styles enabled and tried adding Application.EnableVisualStyles() to the startup as well.

    – gcronin774
    Nov 15 '18 at 17:11











  • What startup? VB.Net doesn't have a Program.vb, unless you make one disabling the Application FrameWork. Then you can start your program from a Sub Main(). Did you do this? You can't have both. A Sub Main() and the Enable XP visual styles option available. Which is it? If you have a Sub Main() in Program.vb, then you need to set both Application.EnableVisualStyles() and Application.SetCompatibleTextRenderingDefault(False) there, before you initialize MainForm.

    – Jimi
    Nov 15 '18 at 21:12












  • Thanks again Jim, Sorry for the confusion. I have a form named FORMstartup.vb that is the Startup form. I do not have a Sub Main() in a module. I tried to put Application.EnableVisualStyles() in the FORMstart_Load, just to see if it would change anything and it did not.

    – gcronin774
    Nov 16 '18 at 22:09











  • It's too late at that point. That mode must be set in the entry point of your application, before any UI element is created. Before a Form's constructor is initialized. At run-time you could have used Application.VisualStyleState = VisualStyleState.NoneEnabled (but this requires a reference to System.Windows.Forms.VisualStyles, you should know you have used this) or called SetWindowTheme with the wrong parameters.

    – Jimi
    Nov 16 '18 at 22:48












  • 1





    Project Properties -> Application -> Enable XP visual styles (if you don't have a Sub Main, otherwise in the module where Sub Main() is).

    – Jimi
    Nov 14 '18 at 16:01












  • Thanks Jim, I did have XP visual styles enabled and tried adding Application.EnableVisualStyles() to the startup as well.

    – gcronin774
    Nov 15 '18 at 17:11











  • What startup? VB.Net doesn't have a Program.vb, unless you make one disabling the Application FrameWork. Then you can start your program from a Sub Main(). Did you do this? You can't have both. A Sub Main() and the Enable XP visual styles option available. Which is it? If you have a Sub Main() in Program.vb, then you need to set both Application.EnableVisualStyles() and Application.SetCompatibleTextRenderingDefault(False) there, before you initialize MainForm.

    – Jimi
    Nov 15 '18 at 21:12












  • Thanks again Jim, Sorry for the confusion. I have a form named FORMstartup.vb that is the Startup form. I do not have a Sub Main() in a module. I tried to put Application.EnableVisualStyles() in the FORMstart_Load, just to see if it would change anything and it did not.

    – gcronin774
    Nov 16 '18 at 22:09











  • It's too late at that point. That mode must be set in the entry point of your application, before any UI element is created. Before a Form's constructor is initialized. At run-time you could have used Application.VisualStyleState = VisualStyleState.NoneEnabled (but this requires a reference to System.Windows.Forms.VisualStyles, you should know you have used this) or called SetWindowTheme with the wrong parameters.

    – Jimi
    Nov 16 '18 at 22:48







1




1





Project Properties -> Application -> Enable XP visual styles (if you don't have a Sub Main, otherwise in the module where Sub Main() is).

– Jimi
Nov 14 '18 at 16:01






Project Properties -> Application -> Enable XP visual styles (if you don't have a Sub Main, otherwise in the module where Sub Main() is).

– Jimi
Nov 14 '18 at 16:01














Thanks Jim, I did have XP visual styles enabled and tried adding Application.EnableVisualStyles() to the startup as well.

– gcronin774
Nov 15 '18 at 17:11





Thanks Jim, I did have XP visual styles enabled and tried adding Application.EnableVisualStyles() to the startup as well.

– gcronin774
Nov 15 '18 at 17:11













What startup? VB.Net doesn't have a Program.vb, unless you make one disabling the Application FrameWork. Then you can start your program from a Sub Main(). Did you do this? You can't have both. A Sub Main() and the Enable XP visual styles option available. Which is it? If you have a Sub Main() in Program.vb, then you need to set both Application.EnableVisualStyles() and Application.SetCompatibleTextRenderingDefault(False) there, before you initialize MainForm.

– Jimi
Nov 15 '18 at 21:12






What startup? VB.Net doesn't have a Program.vb, unless you make one disabling the Application FrameWork. Then you can start your program from a Sub Main(). Did you do this? You can't have both. A Sub Main() and the Enable XP visual styles option available. Which is it? If you have a Sub Main() in Program.vb, then you need to set both Application.EnableVisualStyles() and Application.SetCompatibleTextRenderingDefault(False) there, before you initialize MainForm.

– Jimi
Nov 15 '18 at 21:12














Thanks again Jim, Sorry for the confusion. I have a form named FORMstartup.vb that is the Startup form. I do not have a Sub Main() in a module. I tried to put Application.EnableVisualStyles() in the FORMstart_Load, just to see if it would change anything and it did not.

– gcronin774
Nov 16 '18 at 22:09





Thanks again Jim, Sorry for the confusion. I have a form named FORMstartup.vb that is the Startup form. I do not have a Sub Main() in a module. I tried to put Application.EnableVisualStyles() in the FORMstart_Load, just to see if it would change anything and it did not.

– gcronin774
Nov 16 '18 at 22:09













It's too late at that point. That mode must be set in the entry point of your application, before any UI element is created. Before a Form's constructor is initialized. At run-time you could have used Application.VisualStyleState = VisualStyleState.NoneEnabled (but this requires a reference to System.Windows.Forms.VisualStyles, you should know you have used this) or called SetWindowTheme with the wrong parameters.

– Jimi
Nov 16 '18 at 22:48





It's too late at that point. That mode must be set in the entry point of your application, before any UI element is created. Before a Form's constructor is initialized. At run-time you could have used Application.VisualStyleState = VisualStyleState.NoneEnabled (but this requires a reference to System.Windows.Forms.VisualStyles, you should know you have used this) or called SetWindowTheme with the wrong parameters.

– Jimi
Nov 16 '18 at 22:48












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53303897%2fvisual-studio-vb-winform-style-theme-changed-texbox-now-has-dropshadow%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53303897%2fvisual-studio-vb-winform-style-theme-changed-texbox-now-has-dropshadow%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Top Tejano songwriter Luis Silva dead of heart attack at 64

政党

天津地下鉄3号線