473,396 Members | 1,895 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

PictureBox scaling

I have written an app in VB2005. This app uses a picturebox that is 256x256 pixels. It looks fine on the PC on which the app was developed.

When I run the app on another PC, the picture box looks distorted: it appears elongated vertically, but still is 256x256.

How do I scale this picturebox appear square on different PCs?
Oct 15 '07 #1
6 2200
Try getting the screen size through My.Computer.Screen.PrimaryScreen, and adjust the PictureBox size according to the screen's width and height.
Oct 15 '07 #2
Killer42
8,435 Expert 8TB
Try getting the screen size through My.Computer.Screen.PrimaryScreen, and adjust the PictureBox size according to the screen's width and height.
It might be better to get whatever the VB2005 equivalent is of VB6's Screen.TwipsPerPixelX and Screen.TwipsPerPixelY properties.
Oct 16 '07 #3
Try getting the screen size through My.Computer.Screen.PrimaryScreen, and adjust the PictureBox size according to the screen's width and height.
Thanks for the input, but both the PC on which the PB looks ok and the one where the PB appears distorted are set to the same resolution.
Oct 16 '07 #4
Killer42
8,435 Expert 8TB
Thanks for the input, but both the PC on which the PB looks ok and the one where the PB appears distorted are set to the same resolution.
That's weird. Does one of them have a wide screen?
Oct 16 '07 #5
That's weird. Does one of them have a wide screen?
No, both are 4:3 aspect ratio. However, the development PC has a regular monitor and the other PC has a LCD flat panel monitor
Oct 17 '07 #6
Killer42
8,435 Expert 8TB
No, both are 4:3 aspect ratio. However, the development PC has a regular monitor and the other PC has a LCD flat panel monitor
Well, I suppose one of them must simply have the monitor adjusted so that the aspect ratio comes out a bit different. To be honest, I doubt there's much you can do about it. Unless you want to try and calibrate your program by putting a circle on the screen, adjusting the ratio and asking the user "does it look round yet?"
Oct 17 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Bent F | last post by:
Going from VB6 to VB.NET i have lost the capability to do the most simple things... In VB6 scaling a picturebox was done like this: Me.picturebox.scale (0,25)-(25,0) How is it done in...
7
by: Randy Vande Hei | last post by:
Does anyone know how to change the the GDI+ coordinate system like you used to be able to do in VB6 with the picturebox.scale method. The picturebox.scale method took an x,y point defining the...
0
by: SamSpade | last post by:
I have a usercontrol that contains a picturebox. The user can obtain (creategraphics) a picturebox graphics object and draw on the picturebox. She could do gr.GraphincInit.Millimeter and then draw...
4
by: midicad2001 | last post by:
I have been researching this issue and have come across a number of solutions apparently written for VB5 or 6 and don't work under .NET, yes folks that is progress! Someone in this ng suggested...
17
by: IanIpp | last post by:
We have a 3 month old quad processor/dual core server running SQL Server 2005 and already it is getting close to hitting the CPU wall. An 8 way CPU box is prohibitively expensive and out of the...
0
by: Brahm | last post by:
Going from VB6 to VB.NET i have lost the capability to do the most simple things... In VB6 scaling a picturebox was done like this: Me.picturebox.scale (0,25)-(25,0) How is it done in VB.NET...
1
by: John | last post by:
I have an app where I want to show an icon in a large PictureBox. I've set the SizeMode to Zoom but the icon image is extremely fuzzy because the scaling up also anti-aliases. Is there a way to...
1
by: Eric | last post by:
Hi, I'm writing a program that based on input will create a document. It is something simulair as a printing example. In MS Word when you click on the shown document you can zoom in and if you...
2
by: =?Utf-8?B?Sm9uIFBhcnJ5?= | last post by:
Hi, I've got a Picturebox, into which I am putting a frame bitmap from a video camera. The camera bitmap is larger than the picturebox, which has SizeMode set to "Zoom" which causes the bitmap...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.