窗体一
Private Sub Command1_Click()
If Text1.Text <> "" Then
Text2.Text = 9 / 5 * Text1.Text + 32
End If
End Sub
Private Sub Command2_Click()
If Text2.Text <> "" Then
Text1.Text = (Text2.Text - 32) * 5 / 9
End If
End Sub
Private Sub Command3_Click()
Form2.Show
End Sub
窗体二:
Private Sub Command1_Click()
End
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text2.Text = 9 / 5 * Text1.Text + 32
End If
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text1.Text = (Text2.Text - 32) * 5 / 9
End If
End Sub