I’m having a bit of a brain fart here and can’t seem to get this right.
I have a canvas on a window that I want to re-size based on inputted dimensions - I’m only concerned with the resulting width and height aspect ration of the canvas being the same as the inputted dimensions and being an appropriate size to see on the screen.
In the keyUp event of the Height textfield I have
[code]dim dHeightInches As Double
dHeightInches = Cdbl(tfImageHeight.Text) * 20
cImage.Height = dHeightInches
Return
[/code]
and similar code in the width field.
since the pixels aren’t square I’m not sure what values to use to get the ratio right. Any thoughts would be greatly appreciated