R
Robin Tucker
RatioX is 2.018 (verified)
RatioY is 0.6291 (verified)
Therefore Ratio becomes 0.6291 (verified)
BUT! When I trace through the calc, BigPicture.Width becomes 625! Did I
make a huge mistake here? I can't see it
' Now find ratio of width and height to 320 x 240
Dim RatioX As Single = CType((sWidth / 320.0F), Single)
Dim RatioY As Single = CType((sHeight / 240.0F), Single)
Dim Ratio As Single = Math.Min(RatioX, RatioY)
' Set the width and height of the big picture
BigPicture.Width = CType((Ratio * 320.0F), Integer)
BigPicture.Height = CType((Ratio * 240.0F), Integer)
RatioY is 0.6291 (verified)
Therefore Ratio becomes 0.6291 (verified)
BUT! When I trace through the calc, BigPicture.Width becomes 625! Did I
make a huge mistake here? I can't see it
' Now find ratio of width and height to 320 x 240
Dim RatioX As Single = CType((sWidth / 320.0F), Single)
Dim RatioY As Single = CType((sHeight / 240.0F), Single)
Dim Ratio As Single = Math.Min(RatioX, RatioY)
' Set the width and height of the big picture
BigPicture.Width = CType((Ratio * 320.0F), Integer)
BigPicture.Height = CType((Ratio * 240.0F), Integer)