把Text3的Locked(锁定)属性设为True即可
Private Sub Form_Load()
Text3.Enabled = False
End Sub
Private Sub Text1_Change()
Text3.Text = Val(Text1.Text) ^ 2 + Val(Text2.Text) ^ 2
End Sub
Private Sub Text2_Change()
Text3.Text = Val(Text1.Text) ^ 2 + Val(Text2.Text) ^ 2
End Sub
文本框灰色、不可更改,是设置该文本框的属性enabled为false,即:
text3.enabled=false