Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old April 16th, 2008, 08:05 PM
Authorized User
 
Join Date: Jul 2007
Location: , , .
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.
Reply With Quote
  #2 (permalink)  
Old April 17th, 2008, 02:30 AM
Friend of Wrox
 
Join Date: Mar 2007
Location: Hampshire, United Kingdom.
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
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 01: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



All times are GMT -4. The time now is 07:16 AM.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.