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?
6 2211
Try getting the screen size through My.Computer.Scr een.PrimaryScre en, and adjust the PictureBox size according to the screen's width and height.
Try getting the screen size through My.Computer.Scr een.PrimaryScre en, 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.TwipsPer PixelX and Screen.TwipsPer PixelY properties.
Try getting the screen size through My.Computer.Scr een.PrimaryScre en, 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.
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?
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
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?"
Sign in to post your reply or Sign up for a free account.
Similar topics |
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 VB.NET ?
All I want to do is draw simple lines and circle in a coordinate system.
|
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 upper left corner and
a second x,y point defining the lower right corner.
In VB6 the 0,0 location was the upper left like in GDI+, but I could at
least reset it so I could use it with lat/lons. Basically all I want to do
is be able to use the...
|
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 using millimeters as
the measurement.
But he would still have to dimension the Picture box using pixels
(Clientsize for example). He changes the picture box dimensions via
usercontrol properties so I could scale them going in and out.
Couple...
|
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 just drop your picturebox into a panel
with autoscroll=TRUE.
I am wondering if this will work for my desired application - see
details.
|
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 question. I
am looking desperately for a way to TRULY scale out SQL server...in the
same way that IIS can be scaled out via App Center.
The "in the box" solution for SQL Server 2005 scaling out is the DMV.
Unfortunately this solution makes...
| |
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 ?
All I want to do is draw simple lines and circle in a coordinate system.
|
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 turn the anti-aliasing
off so I get a nice blocky icon image?
--
"I have nothing but the greatest respect for other peoples' crackpot
beliefs".
-- Sam the Eagle.
|
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
click again you'll zoom out again.
This is what I would like to do as well.
I draw the document in a bitmap, since all the information is drawn from a
database and on the form it is shown in a picturebox.
|
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 to be resized and correctly displayed.
My question is whether letting the Picturebox do the bitmap resizing is the
most efficient mechanism, or whether it would be preferable to perfrom the
resizing myself before passing the modified image to...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
| |
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |