I was wondering if there is a way to save a part of a picturebox to a file.
I may want to take coordinates like (50,30) to (100,400) and save it to a BMP file.
Thanks in advance
Printable View
I was wondering if there is a way to save a part of a picturebox to a file.
I may want to take coordinates like (50,30) to (100,400) and save it to a BMP file.
Thanks in advance
I guess you could use PictureClip control to clip it and then save, or BitBlt the part you want to another picbox first. Pic clip is very easy to use, you can find sufficient examples in the manual. I don't have the code I used once, sorry.
BitBlt Picture2.hDC, 0, 0, 100 - 50, 400 - 30, Picture1.hDC, 50, 30, SRCCOPY
Then save Picture 2's IMAGE property with the savepicture method.
Thanks,
I actually figured it out a few days ago after no replies, but I used the exact same method.