View Single Post
  #2 (permalink)  
Old November 23rd, 2011, 11:07 AM
Rod Stephens's Avatar
Rod Stephens Rod Stephens is offline
Wrox Author
Points: 3,166, Level: 23
Points: 3,166, Level: 23 Points: 3,166, Level: 23 Points: 3,166, Level: 23
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2006
Location: , , .
Posts: 647
Thanks: 2
Thanked 96 Times in 95 Posts
Default

This isn't too bad. Here are the steps.
  1. Create a new Bitmap that's the right size to hold the piece you are copying.
  2. Create a Graphics object to work with the new Bitmap.
  3. Use the Graphics object's DrawImage method to draw the part of the image you want into the new Bitmap.
See this example:
Copy part of an image into a new PictureBox in Visual Basic .NET
__________________
Rod

Rod Stephens, Microsoft MVP

Essential Algorithms: A Practical Approach to Computer Algorithms

(Please post reviews at Amazon or wherever you shop!)
Reply With Quote
The Following User Says Thank You to Rod Stephens For This Useful Post:
Gary108 (November 23rd, 2011)