Hi there !
Anyone can help me.
Is there any method to load specific part of image file and put it into Image or PictureBox.
Thanks
Vbkids
Printable View
Hi there !
Anyone can help me.
Is there any method to load specific part of image file and put it into Image or PictureBox.
Thanks
Vbkids
what exactly do you mean "part" of a image?
Using paintpicture you can set the destination coordinates,width and height of the graphics being applied and the source coordinates, width and height.
Ergo, you can grab a rectangular section of graphic from on picturebox and place it in another picture box (or straight onto the form).
Look up .paintpicture in your help files and see if that does the trick.
If you don't need to stretch the image from it's original size, you should use bitblt api, it's faster
What I really want to know is that
I don't want to use:
Image1.Picture = LoadPicture("...")
Picture1.PaintPicture Image1.Picture,....
I just want to load picture and use it without middle control. And I don't want to load all picture just some part for example the middle part of the image.
-------
| |
| |
-------
Wish more help
Thanks in advance
vbkids :)
You have to load the whole picture :( since the data is stored in a byte array. Maybe you could make it load just the horizontal section that is part of the picture but that's a hard thing to do. I guess you won't win much time if you don't have a huge bitmap which is very vertically excentric.
Thanks for all of your who have tried to show me the way.
All of your comment are very useful to me.
And finally from what I get I can find the solution for what I really want in MSDN :)
Good Luck!
vbkids