
VB代码怎么写
Private Sub Command1_Click()
If Option1.Value = True Then
Text2 = Sin(Val(Text1))
End If
If Option2.Value = True Then
Text2 = Exp(Val(Text1))
End If
If Option3.Value = True Then
Text2 = Sqr(Val(Text1))
End If
If Check1.Value = 1 Then
Text2.FontBold = True
End If
If Check2.Value = 1 Then
Text2.FontItalic = True
End If
End Sub
Private Sub Form_Load()
Label1.Caption = "参数"
Label2.Caption = "结果"
Command1.Caption = "计算"
Frame1.Caption = ""
Frame2.Caption = ""
Option1.Caption = "sin"
Option2.Caption = "exp"
Option3.Caption = "sqr"
Check1.Caption = "粗体"
Check2.Caption = "斜体"
Text1 = 4
Text2 = ""
Text2.BackColor = &H80000006
Text2.BorderStyle = 0
Text2.FontSize = 20
Option3.Value = True
End Sub
广告 您可能关注的内容 |