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

Scaling a bitmap in a picturebox

Hi,

I'm writing a program that based on input will create a document. It is
something simulair as a printing example.
In MS Word when you click on the shown document you can zoom in and if you
click again you'll zoom out again.

This is what I would like to do as well.
I draw the document in a bitmap, since all the information is drawn from a
database and on the form it is shown in a picturebox.

So what I'm trying to find out is how I can zoom in a certain factor by
clicking somewhere in the document.
If I use the SCALE method I can zoom in and out but how can I move the
bitmap so that the point clicked on is shown in the center of the
picturebox.

Please give me some directions on how to do this?

thanks,
Eric
Aug 5 '06 #1
1 1775
Zoompicbox, an article on my site, will help you get started with this.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"Eric" <so*****@MicroZoft.comwrote in message
news:44**********************@text.nova.planet.nl. ..
Hi,

I'm writing a program that based on input will create a document. It is
something simulair as a printing example.
In MS Word when you click on the shown document you can zoom in and if you
click again you'll zoom out again.

This is what I would like to do as well.
I draw the document in a bitmap, since all the information is drawn from a
database and on the form it is shown in a picturebox.

So what I'm trying to find out is how I can zoom in a certain factor by
clicking somewhere in the document.
If I use the SCALE method I can zoom in and out but how can I move the
bitmap so that the point clicked on is shown in the center of the
picturebox.

Please give me some directions on how to do this?

thanks,
Eric


Aug 7 '06 #2

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

Similar topics

3
by: jeff | last post by:
Hiya, Im currently in the process of developing a picture browser, I want it to run off a CD, basically I have 2 questions for the group. The first is how do I get the program to only view the...
1
by: James Dean | last post by:
I have tried a few different methods for scaling an image down but all seem a bit on the slow side. Is there any way i can make this scaling faster....... Here is how i do it now. To display my...
2
by: Sharon | last post by:
I encountered a strange behavior when doing ‘new Bitmap’: The following code works fine and the given bitmap file is shown on the PictureBox (the m_DrawArea) in the correct bitmap sizes: ...
2
by: active | last post by:
Problem: The PictureBox display appears to have the image cut off. I.e., the image bottom does not display although the PictureBox has room for it. It occurred to me that what was displayed was...
3
by: Larry Serflaten | last post by:
I am taking a 256 color bitmap from a file and scaling it up X 16 to a 32bppPARGB bitmap in memory. I copy that image to the screen. After scaling, the edges of all the lines and colors are...
2
by: Mad Scientist Jr | last post by:
I have a bitmap (32 pixels high, 8192 pixels wide) that contains 255 images, each 32 pixels wide, that I would like to chop up into individual 32x32 bitmap files. Rather than spending hours in...
2
by: Eric | last post by:
Hi, I'm writing a program that based on input will create a document. It is something simulair as a printing example. In MS Word when you click on the shown document you can zoom in and if you...
2
by: =?Utf-8?B?Sm9uIFBhcnJ5?= | last post by:
Hi, I've got a Picturebox, into which I am putting a frame bitmap from a video camera. The camera bitmap is larger than the picturebox, which has SizeMode set to "Zoom" which causes the bitmap...
0
by: =?Utf-8?B?U2hhcm9u?= | last post by:
Using VS2005 with .NET Framework 2.0 I'm using the the System.Windows.Forms.PictureBox to display a bitmap when the PictureBox.SizeMode is PictureBoxSizeMode.StretchImage The PictureBox can be...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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...
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...

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.