|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Scaling a bitmap in a pictureboxI'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 Hello Eric,
Check out the PrintDocument class and the print preview features of the framework. -Boo Show quoteHide quote > 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 Zoompicbox, an article on my site, will help you get started with this.
-- Show quoteHide quoteBob 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" <some***@MicroZoft.com> wrote in message news:44d4efdb$0$2030$ba620dc5@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 > >
Create DLL in Visual Studio 2005 accessible by Excel 2002
Remoting - Some methods hang on certain setups. VS 2005 form designer major problem Public definitions in module - VS 2005 Dll basic question ThreadPool and DeadLock problems Assign a value to groupbox from a radiobutton contained in groupbo Writing a blank line under an if statement Reading Lines from a File that is in Memory Overwriting a file |
|||||||||||||||||||||||