急需,帮忙解答VB编程问题,万分感谢

来源:百度知道 编辑:UC知道 时间:2024/07/07 16:32:44
1窗体上有一个名称为Text1的文本框;两个复选框,名称分别为Ch1和Ch2,
标题分别为"英语班"和"计算机班";一个名称为C1、标题为"确定"
命令按钮。要求程序运行后,如果只选中Ch1,单击"确定"命令按钮,则
在文本框中显示:"报名参加英语班";如果只选中Ch2,单击"确定"命
令按钮,则在文本框中显示:"报名参加计算机班";如果同时选中 Ch1
和Ch2,然后单击"确定"命令按钮,则在文本框中显示:"报名参加英语
班和计算机班";如果Ch1和Ch2都不选,然后单击"确定"命令按钮, 则
在文本框中什么都不显示。
2在窗口中有一个名为Image1的图像框,还有两个命令按钮,名称分别是C1
和C2,标题分别是"放大"和"缩小"。要求程序运行后,点击C1按钮,则
图像框变大;点击C2按钮,则图像框变小。

万分感谢各位帮忙者

1、
if Ch1.value=checked and ch2.value=unchecked then
text1.text="报名参加英语班"
elseif ch1.value=unchecked and ch2.value=checked then
text1.text="报名参加计算机班"
elseif ch1.value=checked and ch2.value=checked then
text1.text="报名参加英语班和计算机班"
elseif ch1.value=unchecked and ch2.value=unchecked then
text1.text=""
endif
2、
Private Sub C1_click()
Image1.Height = 300
Image1.Width = 200
end sub
Private Sub C2_click()
Image1.Height = 30
Image1.Width = 20
end sub
回答者: adai011 - 助理 三级 5-30 23:37

学的不好 没法帮啦

1、
if Ch1.value=checked and ch2.value=unchecked then
text1.text="报名参加英语班"
elseif ch1.value=unchecked and ch2.value=checked then
text1.text="报名参加计算机班"
elseif ch1.value=checked and ch2.value=checked then
text1.text="报名参加英语班和计算机班"
elseif ch1.value=unchecked and ch2.value=unchecked