Hi
I have image saved. Now i want that iy should be cropped from centre at the bottom and height 30 % from the bottom.
It should be displayed in PictureBox in Vb6
Thanks
Hi
I have image saved. Now i want that iy should be cropped from centre at the bottom and height 30 % from the bottom.
It should be displayed in PictureBox in Vb6
Thanks
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Eliana BlakePosted Mar 20, 2025, 3:02 PM
It seems like you are looking to crop an image in VB6 from the center at the bottom and specifically to a height of 30% from the bottom. Here's an outline of how you can achieve this:
1. Load the image into a PictureBox control in VB6.
2. Calculate the dimensions for cropping the image to 30% height from the bottom:
- Determine the original height of the image.
- Calculate 30% of the height to get the cropping height.
- Set the cropping rectangle starting from the center at the bottom with the calculated height.
3. Use the PaintPicture method in VB6 to crop and display the image in the PictureBox.
Below is a simplified example based on the steps mentioned above to guide you in VB6:
Make sure to adjust the code to fit your specific requirements and image loading method in VB6.
I hope this helps you achieve the image cropping functionality you are looking for in VB6! If you have any further questions or need assistance with specific details, feel free to ask.