473,399 Members | 2,146 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,399 software developers and data experts.

Zoom/resize image in picturebox with sizemode set to autosize

Hello,

I am putting together a simple picture viewing program to view jpg. bmp
pictures. I have the picturebox sizemode set to autosize. I have the
picturebox in a pannel set to autoscroll, so if I get a picture that is
larger than the width/height of the containing form (pannel, etc) I can
scroll. But some of the pictures are like 5 megapixels and are just way too
large for the screen. When I open this pic in Microsoft Photo Editor - it
opens to 50% zoom by default. How can I set the zoom in my picturebox which
is set to autosize? How do I set the zoom? Like if I get the image size say
1900x800 I will automatically zoom the image to 50%. How do I set the zoom
of the image? I tried Img.Zoom, but there is no .Zoom.

Thanks,
Rich
Nov 21 '05 #1
6 22360
Maybe you can use the zoompicbox from bobpowell

http://www.bobpowell.net/zoompicbox.htm

Greetz Peter

--
Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe trying to produce
bigger and better idiots. So far, the Universe is winning.

"Rich" <Ri**@discussions.microsoft.com> schreef in bericht
news:8B**********************************@microsof t.com...
Hello,

I am putting together a simple picture viewing program to view jpg. bmp
pictures. I have the picturebox sizemode set to autosize. I have the
picturebox in a pannel set to autoscroll, so if I get a picture that is
larger than the width/height of the containing form (pannel, etc) I can
scroll. But some of the pictures are like 5 megapixels and are just way too large for the screen. When I open this pic in Microsoft Photo Editor - it
opens to 50% zoom by default. How can I set the zoom in my picturebox which is set to autosize? How do I set the zoom? Like if I get the image size say 1900x800 I will automatically zoom the image to 50%. How do I set the zoom of the image? I tried Img.Zoom, but there is no .Zoom.

Thanks,
Rich

Nov 21 '05 #2
Rich,

I have this nowhere as sample. (I have it as part of a program, however in
to much methods to be able to cut it)

I thought that in the 101 samples there was somewhere showed how to do what
you ask)

http://msdn.microsoft.com/vbasic/dow...de/101samples/

Most samples are still for version 1.1

Don't be agry at me when it is not.

I hope this helps anyhow

Cor
Nov 21 '05 #3
Thanks all for your replies. I am still using VS2003. Would the examples
from the 101 samples site work with 2003? I will also try your example -
Peter.

Thanks again all,
Rich

"Rich" wrote:
Hello,

I am putting together a simple picture viewing program to view jpg. bmp
pictures. I have the picturebox sizemode set to autosize. I have the
picturebox in a pannel set to autoscroll, so if I get a picture that is
larger than the width/height of the containing form (pannel, etc) I can
scroll. But some of the pictures are like 5 megapixels and are just way too
large for the screen. When I open this pic in Microsoft Photo Editor - it
opens to 50% zoom by default. How can I set the zoom in my picturebox which
is set to autosize? How do I set the zoom? Like if I get the image size say
1900x800 I will automatically zoom the image to 50%. How do I set the zoom
of the image? I tried Img.Zoom, but there is no .Zoom.

Thanks,
Rich

Nov 21 '05 #4
Rich

This is what I wrote
Most samples are still for version 1.1


With what I mean Net 1.1 ergo Visual Studio 2003, you have to page to those
pages and than that is written somewhere

I hope this helps,

Cor
Nov 21 '05 #5
Thanks all for your replies. I am still using VS2003. Would the examples
from the 101 samples site work with 2003? I will also try your example -
Peter.

Thanks again all,
Rich

"Rich" wrote:
Hello,

I am putting together a simple picture viewing program to view jpg. bmp
pictures. I have the picturebox sizemode set to autosize. I have the
picturebox in a pannel set to autoscroll, so if I get a picture that is
larger than the width/height of the containing form (pannel, etc) I can
scroll. But some of the pictures are like 5 megapixels and are just way too
large for the screen. When I open this pic in Microsoft Photo Editor - it
opens to 50% zoom by default. How can I set the zoom in my picturebox which
is set to autosize? How do I set the zoom? Like if I get the image size say
1900x800 I will automatically zoom the image to 50%. How do I set the zoom
of the image? I tried Img.Zoom, but there is no .Zoom.

Thanks,
Rich

Nov 21 '05 #6
Rich

This is what I wrote
Most samples are still for version 1.1


With what I mean Net 1.1 ergo Visual Studio 2003, you have to page to those
pages and than that is written somewhere

I hope this helps,

Cor
Nov 21 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Li Weng | last post by:
Hi, I have a form with a picturebox. I added an image in picturebox at design time. I create the form in codes with New and .Show() to pop up. But image doesn't show up. The picturebox looks...
3
by: Alberto | last post by:
I'm trying to load an image in a PictureBox but I want the PictureBox has always the same size and if the image is bigger, show a scrollBars. How can I do it? Thank you
1
by: marco | last post by:
I'm a newbie and i'm doing a little application that open image. I don't understand what i've to do to have a zoom of an image...i don't know where's the error. If anyone know a simple code tell me...
2
by: marco | last post by:
I'm a newbie and i'm doing a little application in C# for a Pocket PC that open image. I don't understand what i've to do to have a zoom of an image...i don't know where's the error. If anyone...
4
by: Dan | last post by:
I have a folder with various images which are updated (externally) periodically and a web page with an image control, text and user control buttons. Depending on the users actions, I want to...
1
by: Al | last post by:
I'm using visual C# 2005 Express Edition and I would like to open the image in the picture box, without make the picture box larger. For the moment, the code is: private void button1_Click(object...
7
by: Georges Bessis | last post by:
The image I set as background are left at original size. In a picturebox, I can decide to strech the image. Can I do that to fill my background ? Regards GB
1
by: Ricardo Furtado | last post by:
I've been with a problem for about two months and i've bought books and search the internet for an explanation, and haven't found one. I'm developing a cephalometric software, that needs to capture...
4
by: wasishincar | last post by:
I'm trying to read a bitmap and zoom in/out it on screen. I wrote some code but it did not perform as I expect. The bitmap shift 1 pixel to the upper-left coner when zooming in/out button was...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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.