471,119 Members | 1,453 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,119 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 22068
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Li Weng | last post: by
3 posts views Thread by Alberto | last post: by
1 post views Thread by marco | last post: by
2 posts views Thread by marco | last post: by
4 posts views Thread by Dan | last post: by
1 post views Thread by Ricardo Furtado | last post: by
4 posts views Thread by wasishincar | last post: by

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.