Windows Develop Bookmark and Share   
 index > Windows Forms General > Looks OK in Windows XP - looks a mess in Vista!
 

Looks OK in Windows XP - looks a mess in Vista!

Hi. :)

I designed a program in XP - though my operating system is Vista. I have a virtual machine which runs XP with VS 2008, SQL server etc on so my OS runs fine when I don't need to development.

So, I made this nice program which looks fine in XP. I've now installed the program in Vista and it looks pretty bad. My gridview columns go off the screen for example. My calendar control barely shows the Saturday dates as they chop off the side of the control.

Anyway I can keep the forms relative in XP and Vista? Is this a problem with resolutions? What if the program is installed on other people's machines at different resolutions etc.

Thanks,
Ricky
Muffinbubble  Tuesday, August 11, 2009 7:26 PM
It is not a resolution problem, it is a scaling problem. The Vista machine runs with a larger system font and Windows Forms needs to make the controls bigger so the text will still fit inside them. You need to accommodate that in your layout. Avoid setting the sizes of your form and control after they are created.

To test this and not constantly having to switch between machines, you can change the form's Font property in the Load event.

Hans Passant.
  • Marked As Answer byMuffinbubble Wednesday, August 12, 2009 8:07 AM
  •  
nobugz  Tuesday, August 11, 2009 8:27 PM
Hi,
Set the anchor property for all yourwindows formscontrols.and check your form with all resolution.i hope it will help you
Best Regards, C.Gnanadurai ----------------------- Please mark the post as answer if it is helpfull to you
  • Marked As Answer byMuffinbubble Wednesday, August 12, 2009 8:07 AM
  •  
Gnanadurai  Wednesday, August 12, 2009 7:39 AM
It is not a resolution problem, it is a scaling problem. The Vista machine runs with a larger system font and Windows Forms needs to make the controls bigger so the text will still fit inside them. You need to accommodate that in your layout. Avoid setting the sizes of your form and control after they are created.

To test this and not constantly having to switch between machines, you can change the form's Font property in the Load event.

Hans Passant.
  • Marked As Answer byMuffinbubble Wednesday, August 12, 2009 8:07 AM
  •  
nobugz  Tuesday, August 11, 2009 8:27 PM
Hi,
Set the anchor property for all yourwindows formscontrols.and check your form with all resolution.i hope it will help you
Best Regards, C.Gnanadurai ----------------------- Please mark the post as answer if it is helpfull to you
  • Marked As Answer byMuffinbubble Wednesday, August 12, 2009 8:07 AM
  •  
Gnanadurai  Wednesday, August 12, 2009 7:39 AM
Hi all

Thanks for the replies. They have been helpful.

Thanks,
Ricky
Muffinbubble  Wednesday, August 12, 2009 8:08 AM

You can use google to search for other answers

Custom Search

More Threads

• the program is stuck while processing.
• Sorting disable in datagridview datetime column after binding with source.
• webbrowser control + reading Request Header Information
• WebBrowser Paint
• combobox.selectedItem
• Size a RichTextBox to fit its content
• Using PrintDocument to print Alpha-Blended GDI+ vector graphics (Alpha Blending Transparency Printing .Net)
• IE7 Tabs Control
• How to deal with Windows Forms Application?
• Zooming in on a user control