Private Sub txtpxWidth_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtpxWidth.KeyPress Dim originalWidth As Integer = _storeImage.Width Dim originalHeight As Integer = _storeImage.Height Dim newWidth As Integer Dim newHeight As Integer If txtpxWidth.Text = "" Then Else If CheckBox1.CheckState = CheckState.Checked Then newWidth = originalWidth / originalHeight * txtpxHeight.Text newHeight = originalHeight / originalWidth * txtpxWidth.Text txtpxHeight.Text = newHeight Else newWidth = txtpxWidth.Text newHeight = txtpxHeight.Text End If End If End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)