473,396 Members | 1,771 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.

extracting part of a graphic in a PictureBox

i need to extract a rectangular area from a graphic image displayed in a
PictureBox, to another PictureBox.

how can i do that? i would appreciate a piece of code if possible.

thanks,

ray
Jan 30 '06 #1
1 1881
using (Graphics graphics = image1.CreateGraphics())
{
graphics.DrawImage(image2.Image, new Rectangle(0, 0, 100,
100), new Rectangle(150, 150, 50, 50), GraphicsUnit.Pixel);
}

image1 and image2 are picture boxes

"ray well" wrote:
i need to extract a rectangular area from a graphic image displayed in a
PictureBox, to another PictureBox.

how can i do that? i would appreciate a piece of code if possible.

thanks,

ray

Jan 31 '06 #2

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

Similar topics

1
by: ray well | last post by:
hi, i need to give the user the ability to extract a rectangular area of their choice from a graphic displayed in a picture box to the clipboard, so they can use it elsewhere. say the graphic...
8
by: Brian Ward | last post by:
I am looking for a simple way to set the image transparency in a PictureBox. I have a moving PictureBox containing a graphic image .. moving by incrementing its Left property. The background...
3
by: Joca | last post by:
I've made a private sub that creates a graphic (using drawrectangle, string, line and stuff like that) inside a picturebox, so i wouldnt place it right on top of the form itself and also beeing able...
7
by: winzone | last post by:
I used system.drawing.graphic in C# to draw the Rectangle and Ellipse in PictureBox. In my PC and other my buddy PC show the drawing graphic and color. But my customer PC doesn't show the drawing...
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
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
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...
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
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.