Zoom Image C# Pocket PC

G

Guest

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 know a simple code tell me the url :O)


private void Zoom200_Click(object sender, System.EventArgs e)

{

PictureBox.Width = PictureBox.Width + (PictureBox.Width * 2);

PictureBox.Height = PictureBox.Height + (PictureBox.Height * 2);

Ridisegna();

}

.......................


private void Ridisegna(){

PictureBox.SizeMode = PictureBoxSizeMode.StretchImage;

if ((PictureBox.Image.Height>= PictureBox.Height )||(PictureBox.Image.Width
= PictureBox.Width)){

vScrollBar.Maximum = PictureBox.Height + hScrollBar.Height;

hScrollBar.Maximum = PictureBox.Width + vScrollBar.Width;

hScrollBar.Value = 0;

vScrollBar.Visible = true;

hScrollBar.Visible = true;}

else{


vScrollBar.Visible = false;

hScrollBar.Visible = false; }

The error is that i don't see horizontal and vertical bar when the image is
bigger than picturebox
 
T

Tim Wilson

http://www.google.ca/groups?hl=en&lr=&selm=#[email protected]

--
Tim Wilson
..Net Compact Framework MVP

marco said:
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 know a simple code tell me the url :O)


private void Zoom200_Click(object sender, System.EventArgs e)

{

PictureBox.Width = PictureBox.Width + (PictureBox.Width * 2);

PictureBox.Height = PictureBox.Height + (PictureBox.Height * 2);

Ridisegna();

}

......................


private void Ridisegna(){

PictureBox.SizeMode = PictureBoxSizeMode.StretchImage;

if ((PictureBox.Image.Height>=
PictureBox.Height )||(PictureBox.Image.Width
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top