Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / September 2004

Tip: Looking for answers? Try searching our database.

XP SP2 Shifts Labels!

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike Hansen - 16 Sep 2004 23:29 GMT
I've written a very simple VB.NET app with a form that has a Label and a
TextBox to the right of the Label. The Label has textalign=MiddleRight.

When I run the app on XP SP1, the Label's text butts up to the TextBox.
When I run it on XP SP2, the rightmost letter (approx.) of the Label's text
runs behind the TextBox.

Both boxes are running .NET framework 1.0 with no service pack. Although, I
tried .NET framework service packs 1, 2, and 3 on XP SP2 in an attempt to
remedy the problem and none worked.

Has anybody seen this problem? Any idea how to make the alignment the same
on XP SP1 and XP SP2?

Thanks for any help!
- 17 Sep 2004 01:40 GMT
> Has anybody seen this problem? Any idea how to make the alignment the same
> on XP SP1 and XP SP2?

Have you tried enabling/disabling ClearType on both systems. IIRC, XP SP2
changes the default setting so that ClearType (or possibly Standard
smoothing) is enabled by default. Either one could potentially adjust the
font rendering just enough to prevent the label fitting properly any more if
it's a close thing.

The way to fix it would be to resize and reposition the label dynamically
using Graphics.MeasureString (or similar), or for a slightly more hacky (but
easier) solution leave enough room between the label and textbox that the
difference isn't obvious.

AndyC
Mike Hansen - 17 Sep 2004 17:37 GMT
Andy,

  Thanks very much for your help. The ClearType setting is the cause of the
shifting labels. If I address this by means other than repositioning the
design-time location of the labels, I will post the code here.

Thanks again,
Mike

> > Has anybody seen this problem? Any idea how to make the alignment the same
> > on XP SP1 and XP SP2?
[quoted text clipped - 11 lines]
>
> AndyC

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.