Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 16th, 2008, 08:05 PM
Authorized User
 
Join Date: Jul 2007
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default Picture Box proportional to original image.

Hello,

 I have 3 things to consider here, one is source image, form and picture box.

 My picture or image on the form must be proportional in size to the original image.This image on form should be proportional even during resizeing of the form.

For example if the origianal image is square in shape, my image on form must always be square .

if original image is rectangle with width > height by 10 times, my image on form ,nothing but

pictureBox1.size.width / picturebox1.height = 10.... even on RESIZING. How to do it.

Thanks in advance.
 
Old April 17th, 2008, 02:30 AM
Friend of Wrox
 
Join Date: Mar 2007
Posts: 432
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi watashi,

If you make the PictureBox to the original size you want it (square and in proportion to the original form size), set its Anchor property to all sides and set its SizeMode to Zoom, I think that should have the desired effect.

Rob
http://robzyc.spaces.live.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
Picture Box harfani VB.NET 2002/2003 Basics 0 August 6th, 2007 08:36 AM
Original form SaveAs new doc w/o original VBA ChuckTremain Word VBA 0 February 8th, 2007 02:58 PM
Picture box container controls save to image mujeeb General .NET 0 May 20th, 2006 03:46 AM
Picture Box DARSIN General .NET 1 September 13th, 2004 04:01 AM
How to get a still out of a picture box? TheKing VB How-To 0 June 12th, 2003 10:10 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.