J
johnb41
I have a Picturebox that has an image displayed inside. Through code,
I was able to have the "whole image" display in it without distortion.
(Like a "Fit All" in most any image viewer program)
Now, when the Picturebox gets resized by the user, I want the image to
recalculate and display as "Fit All" again.
So I have code in my SizeChanged event of the picturebox. When the
"size changed", it does it's calculation, and displays properly.
It works, but there is a problem: If the user drags the Picturebox
window larger or smaller, the SizeChanged event fires many times per
second. This causes alot of sluggishness in the app when trying to
display the image.
Is there anyway that i can have the SizeChanged event fire ONCE when
i'm done resizing the picturebox?
(By the way, the picturebox gets resized indirectly. It's dock is set
to Fill. When the interface "Next" to it gets resized, the Picturebox
naturally will resize accordingly)
Thanks for all your help!
John
I was able to have the "whole image" display in it without distortion.
(Like a "Fit All" in most any image viewer program)
Now, when the Picturebox gets resized by the user, I want the image to
recalculate and display as "Fit All" again.
So I have code in my SizeChanged event of the picturebox. When the
"size changed", it does it's calculation, and displays properly.
It works, but there is a problem: If the user drags the Picturebox
window larger or smaller, the SizeChanged event fires many times per
second. This causes alot of sluggishness in the app when trying to
display the image.
Is there anyway that i can have the SizeChanged event fire ONCE when
i'm done resizing the picturebox?
(By the way, the picturebox gets resized indirectly. It's dock is set
to Fill. When the interface "Next" to it gets resized, the Picturebox
naturally will resize accordingly)
Thanks for all your help!
John