VB公式简单问题,200分求高手解答

来源:百度知道 编辑:UC知道 时间:2024/05/19 17:58:52
在公式p=a*(T-Q)中

当为二氧化碳时,a=18.9/K
当为氮气时,a=10.5
当为甲烷时,a=10.5*K

这三个选择条件让我无从下手。我知道应该在Frame框架里添加三个Option选项。

但是我不知道程序应该怎么编写!!!

求高手帮忙,

楼主请将以下代码保存为"form1.frm",再打开即可.谢谢给分!Windows xp + VB 6.0 测试通过!

VERSION 5.00
Begin VB.Form Form1
BorderStyle = 1 'Fixed Single
Caption = "VB公式"
ClientHeight = 2835
ClientLeft = 45
ClientTop = 435
ClientWidth = 2460
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 2835
ScaleWidth = 2460
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command1
Caption = "计算"
Height = 495
Left = 480
TabIndex = 4
Top = 2160
Width = 1455
End
Begin VB.Frame Frame1
Caption = "请选择"
Height = 975
Left = 120
TabIndex = 0