0
我有一个函数,其中特定值不允许超过另一个值。但是,如果是这样,我想保留旧文本框中的值,这些文本框在更改之前就已经存在了。我怎么做?如果不符合条件,则保留文本框中的旧值
Private Sub TextBox20_TextChanged(sender As Object, e As EventArgs) Handles TextBox20.TextChanged
'PREVENTS THE USER FROM APPLYING A THICKNESS GREATER THAN THE HIGHT AND LENGTH OF THE EXTRUSION SPECIFIDE...S
If TextBox20.Text >= ((TextBox17.Text/2) + 1) Or TextBox20.Text >= ((TextBox18.Text/2) + 1) Then
MessageBox.Show("CAUTION!" & vbCrLf & vbCrLf & "The material thickness cannot exceed the" & vbCrLf & "total height or width of the extrussion " & vbCrLf & "Either reduce the material thickness or increase the total " & vbCrLf & "height and or width of the extrusion", "Important Note", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1)
End If
'PREVENTS THE USER FROM APPLYING A THICKNESS GREATER THAN THE HIGHT AND LENGTH OF THE EXTRUSION SPECIFIDE...E
End Sub