.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

WinForms Controls under Windows 7

Posted By:      Posted Date: September 02, 2010    Points: 0   Category :Windows Application
I have a small WinForms application which looks fine under Windows XP. When it's run under Windows 7 the controls look awful. The TabControl uses different sizing (horizontal/vertical dimensions) and tab spacing. The images in buttons are very small and lose definition. The CheckBox is very tiny. The height of the header row for DataGridView controls is very small, even though I have set an explicit height. Controls in a certain dialog box do not even work unless I "Disable visual themes" on the Compatibility tab of the application properties. I had carefully sized and aligned controls for a clean appearance under Windows XP. Windows 7 appears to have destroyed those efforts. What's going on and how can I restore the appearance to be as desired? Thanks!

View Complete Post

More Related Resource Links

How to programmatically add controls to Windows forms at run time by using Visual C#

Create a Windows Forms Application
Start Visual Studio .NET or Visual Studio 2005 or a later version, and create a new Visual C# Windows Application project named WinControls. Form1 is added to the project by default.
Double-click Form1 to create and view the Form1_Load event procedure.
Add private instance variables to the Form1 class to work with common Windows controls. The Form1 class starts as follows:

all basic windows controls,wpf controls,silverlight application

here you will find all the information from basic.

Text Rendering: Build World-Ready Apps Using Complex Scripts In Windows Forms Controls


The System.Windows.Forms.TextRenderer class provides support for complex scripts in Windows Forms controls so you can render text the way you want and support international locales.

Miguel A. Lacouture

MSDN Magazine March 2006

Visual Studio .NET: Building Windows Forms Controls and Components with Rich Design-Time Features, P


This is the second of two articles discussing the extremely rich design-time features of the .NET Framework. Part 1 discussed the basics, showing you where to start and how to extend your control implementation through attributes and interfaces, as well as their effects on the property browser, code serialization, and other controls. Part 2 continues the journey by concentrating on design-time functionality that you can implement beyond your components and controls, including TypeConverters, UITypeEditors, and Designers. It would be impossible to cover everything you can do in two short articles, which is a testament to just how all-encompassing and flexible the design-time capability of the .NET Framework is.

Michael Weinhardt and Chris Sells

MSDN Magazine May 2003

Advanced Basics: Windows Forms Controls


Build a control that allows the user to drag and drop other controls onto the new control at run time, and allow the user to move the control around on a form, all in Visual Basic.

Ken Spencer

MSDN Magazine May 2003

Visual Studio .NET: Building Windows Forms Controls and Components with Rich Design-Time Features


Visual Studio .NET provides support for designing rich features into your controls and components, allowing you to set properties, set form placement, inherit from base classes, and much more. So how does Visual Studio .NET do all this? What does the Windows Forms designer do? What's the difference between a control and a component? How does Visual Studio integrate your controls so that they can access features of the .NET Framework?In this article, the authors answer these common questions by building a clock control and taking the reader along for the ride. In building the control, hosts and containers are illustrated, the property browser is explained, debugging is discussed, and a general overview of the design-time infrastructure is presented.

Michael Weinhardt and Chris Sells

MSDN Magazine April 2003

Windows Forms: Developing Compelling User Controls that Target Forms in the .NET Framework


In the beginning, writing controls meant dealing with Windows messages. Then came Visual Basic controls, which introduced methods, properties, and events. Later, ActiveX controls, which ran atop COM, became popular. While each innovation in control writing brought more flexibility, nothing has matched the versatility of the new .NET Windows Forms controls and Web Forms controls. This article, the first of a two-part series, introduces the reader to Windows Forms, beginning with their inheritance from one of the .NET CLR base classes, which makes control creation much faster than before. Control programming is illustrated through the development of a login control. The equally flexible Web Forms controls will be covered in Part 2.

David S. Platt

MSDN Magazine April 2002

Windows Forms/Web Controls Naming Convention


Has Microsoft documented on the naming convention for windows and web controls like they did for Classes.


How to draw editable controls on Windows Vista Glass Frame?

I have a form that is set completely transparent with DwmExtendFrameIntoClientArea API, the issue am facing is when i have editable controls (ComboBox) on the forum the editable part goes transparent the text on the ComboBox is no more visible, i found a solution for the same issue at the following link  http://weblogs.asp.net/kennykerr/archive/2006/08.aspx However it doesnt works, and i read somthing on another web that this soultoin will not work on RC1, or i might be missing some thing, Any help or reference to resolve the issue in C# would be appreciated,   Regards Vallarasu S.

WPF Designer not displaying controls in the toolbox VS2008 Prof Edn running on Windows 7

My Version Microsoft Visual Studio 2008 Version 9.0.30729.4462 QFE Microsoft .NET Framework Version 3.5 SP1 I have windows 7 home premium running on my machine I installed Visual C# 2008 Express Edn with SP1 first I got that running I then installed rest of the Express components including SQL. I then installed Visual Studio 2008 Prof Edn with .Net 3.5 SP1 I then installed .Net 4.0 I run two instance of  C# IDEs. The Pro End and the Express Edn. Both Express/Prof C# versions display controls in toolbox for Windows Forms correctly. I only have problems with controls in toolbox for WPF in VS 2008 Prof Edn. My Scenario : When I use Express Edition the design view of the WPF Designer, it displays the toolbox with controls populated for WPF that I can use. When I use Pro Edition the design view of the WPF Designer, it displays the toolbox with  NO controls visible for WPF  that I can use.  The toolbox has only  "general" tab with the words "not usable controls....". If I do a show all it does show controls but they are disabled/read only. When I look at the Tools -> Choose Toolbox Item , I get the tools dialog box. Inside the box within the WPF Components TAB all controls are not ticked/selected. If I tick the Button Control and select OK, the control does not appear on the toolbox. I have done reset Toolbox no change. I

Weird Exception: Method not found: 'Double System.Windows.Controls.ScrollViewer.get_ContentHorizon

Hi guys I have an XBAP application that uses a Xamdatagrid from Infragistics. I have some filtering on this grid, that rebinds after a filter. The problem is, when a user has scrolled to a certain point and then filters, the rebinding causes the grid to scroll to the beginning position of the grid. Now how I solve this is by getting an instance of the ScrollViewer, I get the ScrollViewer.ContentHorizontalOffset and then I do a ScrollViewer.ScrollToHorizontalOffset after it filters.   Now here comes the problem. For 99% of the users of this xbap app, this will work absolutely fine. Most, if not all of the users run exactly the same machines, XP 64 bit with 8GB RAM. The other 1% get the error: Method not found: 'Double System.Windows.Controls.ScrollViewer.get_ContentHorizontalOffset()'. I cannot reproduce this error on my own box, our dev server or our production server, it is a phantom exception that only pops up on a certain condition. I have even wrapped the "offending" code in a try catch and it still doesn't solve it. If I set the DispatcherUnhandledExceptionArgs Handled to true, it works, but it doesn't feel right. How is this possible? If the method doesn't exist, how can it compile? Why does that method exist for 99% of the other users running the exact same machines? I have googled my fingers raw without any valid results and this issue is frustrat

SpellCheck (System.Windows.Controls) support for other Languages

Hi, I have a question about SpellCheck class. I use .NET 4.0 and I know that 4 languages are supported. I need to write an easy editor with spell check functionality. It will need to support Dutch language. Depending on when Dutch Language will be supported, the current project will go in different directions. Could you provide me any information about when it is going to happen (if it is going to happen)? With kind regards, Michal Bilinski, Meteo Consult, the Netherlands.

Select multiple controls on tabpage, Drag & Drop control(s) (WinForms)


I'm wondering, if somebody got some code or thoughts for selecting multiple control displayed on tab page and drag & drop control on tab page it self. Something like on windows desktop, where you can draw a rectangel with mouse cursor to select folder and files. Also, drag folder or files to different location.



What do I need to use references System.Windows.Controls.DataVisualization.Toolkit, WPFToolkit, Exce

Hi. My friend gave me a WPF application source code made with Visual Studio C# Express 2008. So I downloaded and installed Visual Studio C# 2008 and opened the project. But it will not compaile because some references have warning icons on them, the ones I stated in title. So what am I missing? I have 32 bit Windows 7, I have .NET framework 3.5 and Office 2007.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend