VB中Print语句怎么用?

来源:百度知道 编辑:UC知道 时间:2024/05/08 03:11:13
例:有Form1、Form2、Form3三个窗口,Form1中设有两个Frame控件和两个Lable控件,一组Frame.caption为蔬菜,里面包含黄瓜单选钮和茄子单选钮,另一组是Frame.caption为水果,里面包含草莓单选钮和甜橙单选钮。当蔬菜那组内容被选中时,Lable1中会出现:您选择的是“被选中的内容”;同时水果组内容被选中时Label2中会出现:您选择的是“被选中的内容”。Form2中同样设有两个Frame控件和两个Lable控件,一组Frame.caption为巧克力,里面包含黑巧克力和白巧克力两个复选框,另一组是Frame.caption为糖果,里面包含苹果糖和玉米糖两个复选框,当巧克力组被选中时,Label1中出现:您选择的是“被选中的内容;同时糖果组被选中时,Label2出现:您选择的是“被选中的内容”。
求:Form3的内容为Form1和Form2中四个Label控件里的内容,并随Label控件内容的变化而变化。(对VB的掌握一如我的用户名,诚求各位帮助,谢谢)

楼主如果还是做不出来的话,可以把邮箱留下,我把我用VB6.0做的一个例子给你发过去,解压之后就能运行了,你可以参考下。

好像你的邮箱是qinyehong@126.com是吧?我已经发过去了。

Private Sub Form_Load()
Frame1.Caption = "蔬菜"
Frame2.Caption = "水果"
Option1.Caption = "黄瓜"
Option2.Caption = "茄子"
Option3.Caption = "草莓"
Option4.Caption = "甜橙"
Label1.Visible = False
Label2.Visible = False
Option1.Value = False
Option2.Value = False
Option3.Value = False
Option4.Value = False
Form3.Show

End Sub

Private Sub Option1_Click()
If Option1.Value = True Then
Label1.Caption = Option1.Caption
Form3.Print Label1.Caption
Label1.Visible = True
End If
End Sub
Private Sub Option2_Click()
If Option2.Value = True Then
Label1.Caption = Option2.Caption
Form3.Print Label1.Caption
Label1.Visible = True
End If
End Sub

Private Sub Option3_Click()
If Opti