Click here to Skip to main content
13,355,292 members (58,916 online)
Rate this:
Please Sign up or sign in to vote.
See more:
if I have a picture box and a picture in it , and a rectangle , how can I save a piece of that picture that is in the rectangle ?
Posted 20-Feb-13 9:18am
Sergey Alexandrovich Kryukov 20-Feb-13 14:20pm
Why PictureBox. It's not a picture or a bitmap. Anyway, why asking about it? Now, save where? What did you try?
mohammadali1375 20-Feb-13 14:27pm
I write this program :
now I want save the piece picture that is in red rectangle. I have and rect Rectangle rect; and ....
bur I dont know how do it
Sergey Alexandrovich Kryukov 20-Feb-13 14:29pm
I understand about picture, my concern is PictureBox; most likely, you don't need it.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You should be using bitmaps. You can copy a rectangle region of a bitmap in this way:[^].

That's all you need. And you can save new bitmap the way you want.

mohammadali1375 20-Feb-13 14:36pm
Right. Thank you very much
Sergey Alexandrovich Kryukov 20-Feb-13 14:40pm
My pleasure.
Good luck, call again.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.180111.1 | Last Updated 20 Feb 2013
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100