VB怎样单击回车键就等于按下计算按钮?
PrivateSubCommand1_Click()Text2.Text=3.1415926535*Val(Text1.Text)Text3.Text=3.1415926...
Private Sub Command1_Click()
Text2.Text = 3.1415926535 * Val(Text1.Text)
Text3.Text = 3.1415926535 * Val((Text1.Text) / 2) ^ 2
End Sub 展开
Text2.Text = 3.1415926535 * Val(Text1.Text)
Text3.Text = 3.1415926535 * Val((Text1.Text) / 2) ^ 2
End Sub 展开
1个回答
2014-11-01
展开全部
Private Sub Command1_Click()
Text2.Text = 3.1415926535 * Val(Text1.Text)
Text3.Text = 3.1415926535 * (Val(Text1.Text) / 2) ^ 2
End Sub
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then Command1_Click
End Sub
Private Sub Form_Load()
Me.KeyPreview = True
End Sub
Text2.Text = 3.1415926535 * Val(Text1.Text)
Text3.Text = 3.1415926535 * (Val(Text1.Text) / 2) ^ 2
End Sub
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then Command1_Click
End Sub
Private Sub Form_Load()
Me.KeyPreview = True
End Sub
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询