473,396 Members | 1,678 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,396 software developers and data experts.

Zoom Image C# Pocket PC

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

Nov 17 '05 #1
2 7453
http://www.google.ca/groups?hl=en&lr...TNGP10.phx.gbl

--
Tim Wilson
..Net Compact Framework MVP

"marco" <ma***@discussions.microsoft.com> wrote in message
news:01**********************************@microsof t.com...
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

Nov 17 '05 #2
I totally overlooked the PPC reference this time around. Ok, so the
AutoScroll won't work here. A good code sample for implementing scrolling
content in the Compact Framework can be found here.
http://samples.gotdotnet.com/quickst...scrolling.aspx

You, obviously, need to tweak it out a bit, but it should give you a good
enough start.

--
Tim Wilson
..Net Compact Framework MVP

"Tim Wilson" <TIM(UNDERSCORE)WILSON(AT)ROGERS(PERIOD)COM> wrote in message
news:ue**************@TK2MSFTNGP15.phx.gbl...
http://www.google.ca/groups?hl=en&lr...TNGP10.phx.gbl
--
Tim Wilson
.Net Compact Framework MVP

"marco" <ma***@discussions.microsoft.com> wrote in message
news:01**********************************@microsof t.com...
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


Nov 17 '05 #3

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

Similar topics

0
by: ACaunter | last post by:
Hi there, I have an image on my ASP.Net page and i created a <p> tag that can be dragged around the screen.. I needed to get it so that when the <p> tag is over the image, whatever is inside, or...
2
by: Mo Ade via .NET 247 | last post by:
How do I write code to include a zoom feature in my project so that when my Vb Form loads an image I can click in my main menu zoom in or zoom out? -------------------------------- From: Mo Ade ...
6
by: Rich | last post by:
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...
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...
3
by: Keith G Hicks | last post by:
In MS Access image controls there's a property setting for "Size Mode" --> Clip, Zoom or Stretch. I don't see any similar property in an asp image control. When I have an image on a page, it seems...
4
by: Yoshitha | last post by:
I'm developing windows application using c#.net (vs 2003), i've placed several images (picture boxes) in panel control and i want to zoom the panel control so that the images and text which...
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: murry19830507 | last post by:
i want creat an web application(c#.net),which contains an image and one radiobutton list with 3 radiobuttons(zoom in ,zoom out ,zoom window) when user checked on zoom in imge has to be zoom inthe...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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.