I try to zoom in or out a picture in small steps until it fills the screen. My code: While I <> Math.Round(ZoomFactor, 2) If ZoomFactor >= 1 Then I = I + 0.01 ZoomPicture(1.01) Else I = I - 0.01 ZoomPicture(0.99) End If Me.PictureBox1.Update() End While Private Sub ZoomPicture(ZoomFactor) Dim BiggerImage As Bitmap BiggerImage = New Bitmap(PictureBox1.Image, PictureBox1.Image.Width * ZoomFactor, PictureBox1.Image.Height * ZoomFactor) PictureBox1.Image = BiggerImage End Sub
This works, but the zooming is a bit jerky (not smooth). I would like it to be like a movie (so mnimum 24 zooms/seconds).
Is there a better way to achieve this? But not too complicated (I think using DirectX is very complicated, or isn't it?)
Thanks a lot for an useful information
Marc
Is there a better way to achieve this?Probably you may achive that with XLL. The problem lies in VBA itself, i.e.VBA Engine performance. - Aleksey F.others (languages) after porting header files. Maybe someone already has ported XLL SDK into one of your preffered languages.- Aleksey F.