
Remove flickering in Image Control
Hello Experts,
I am creating an activeX control, to Zoom-In/Out and scroll the images.
Here is what I am doing to get this job done...
I am using 1 picturebox control (pctBorder) and another one (pctImage) which
is placed in the pctBorder. I load the image in pctImage and allow the user
to click on various options like, move left, move right, zoom in, zoom out.
When the user clicks on move left /right/top/bottom, I simply change the
left and top coordinates of the pctImage and that gives the appearance as
image is scrolling withing the outside pctBorder. To do this I have
implemented a timer control running a 1 ms interval. When the user opts for
zoom functions, I increase or decrease the height and width of the pctImage
so that it gives an appearance that image is zooming.
Now the problem I am facing is, there is a lot of flickering in the image
when I change the coordintes or when it is resized. I tried using different
combinations of AutoRedraw but did not succeeded in eradicating the flicker.
Can anyone please tell me how do I make the image transitions, smoother (w/o
flickering). Or a correct method to do what I intend to do.
Thanks in advance
-Niloday