|
Prev: Compressing/extracting cab file
Next: Insufficient system resources exist to complete the requested serv
From: Alan M Dunsmuir on 14 Feb 2005 05:00 I have a VB.NET Windows Forms application which uses as a splash screen a Form which I want to cover, exactly and entirely, with a specified ..jpg PictureBox. So I specified the Form, the PictureBox and the .jpg image as having exactly the same sizes - 820 wide by 460 deep. This works perfectly on my development machine and on my Laptop, both of which run at fairly high screen resolutions. But when I copy the compiled application to my back-up Desktop machine, which uses a somewhat lower screen resolution (and has a CRT instead of a flat monitor), and run it there, the underlying Form shows up as substantially bigger vertically than the PictureBox, and a couple of drop-down list controls on the Form appear well below the textual information (which is actually part of the PictureBox) which is supposed to explain their use. What causes this, and how do I avoid it happening? -- Alan M Dunsmuir
From: Herfried K. Wagner [MVP] on 14 Feb 2005 06:36
"Alan M Dunsmuir" <alan(a)moonrake.demon.co.uk> schrieb: > So I specified the Form, the PictureBox and the .jpg image as having > exactly the same sizes - 820 wide by 460 deep. > > This works perfectly on my development machine and on my Laptop, both of > which run at fairly high screen resolutions. > > But when I copy the compiled application to my back-up Desktop machine, > which uses a somewhat lower screen resolution (and has a CRT instead of a > flat monitor), and run it there, the underlying Form shows up as > substantially bigger vertically than the PictureBox, and a couple of > drop-down list controls on the Form appear well below the textual > information (which is actually part of the PictureBox) which is supposed > to explain their use. > > What causes this, and how do I avoid it happening? This behavior is caused by different DPI settings on the maches. Many laptops/LCDs are used with large fonts (120 DPI), CRTs are typically used with 90 DPI. You may want to play around with the form's 'AutoScale' property (see documentation) to prevent this from happening. -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://dotnet.mvps.org/dotnet/faqs/> |