VB代码怎么写

 我来答
VB编程解放双手
2018-04-18 · 个人VB爱好者专注vb编程_时效软件
VB编程解放双手
采纳数:1204 获赞数:2391

向TA提问 私信TA
展开全部

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

推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式