Windows Develop Bookmark and Share   
 index > Windows Forms Designer > Winforms control appearance is different in the Visual Studio form designer than at run time. .Net3.5 C#
 

Winforms control appearance is different in the Visual Studio form designer than at run time. .Net3.5 C#

I'm using Visual Studio 2008 and developing in .Net3.5.

When I create a new basic WinForms app and throw a couple of group boxes on and then run it I get a form displayed as it appeared in the form designer.

If I use controls from one of our libraries it displays correctly in the form designer with nice rounded corners on the group boxes but when I run the app the group boxes are displayed like an old windows 3.1 form. I've used GroupBoxes as an example but there are other components that aren't displayed correctly (tab controls, buttons...)

I'd like to post a before and after screen shot but I don't seem able to do this.

The library that holds my components and stock forms was originally written in .Net 1.1 but has been recompiled into .Net 3.5. Could this have caused the problem?

There are only 10 types of people. Those who understand binary and those who don't
  • Moved byOmegaManMVPThursday, June 04, 2009 2:39 PM (From:Visual C# General)
  •  
TeamWild  Thursday, June 04, 2009 2:15 PM
Just out of curiosity, what does your main method look like? Are you calling Application.EnableVisualStyles?
David Morton - http://blog.davemorton.net/ - @davidmmorton
  • Marked As Answer byTeamWild Thursday, June 04, 2009 2:23 PM
  •  
David M Morton  Thursday, June 04, 2009 2:19 PM
Just out of curiosity, what does your main method look like? Are you calling Application.EnableVisualStyles?
David Morton - http://blog.davemorton.net/ - @davidmmorton
  • Marked As Answer byTeamWild Thursday, June 04, 2009 2:23 PM
  •  
David M Morton  Thursday, June 04, 2009 2:19 PM
Thanks for such a quick response.

I hadn't got that in the main method. Now that I've added it it all looks nice.


There are only 10 types of people. Those who understand binary and those who don't
TeamWild  Thursday, June 04, 2009 2:24 PM

You can use google to search for other answers

Custom Search

More Threads

• Binary serialization
• Problem deleting containers in designer
• Timer Tick event crashes designer
• Finding the PropertyGrid Delete Key Event in VB.NET
• How to use client area in derived forms
• Move scrollbar at top position
• Advice Appreciated : Building new Control Similar to TabControl
• Visual Inheritance
• Dynamic Graphics
• How do I use AddHandler when using IDesignerHost