VB的几道编程题,麻烦帮我解答一下

2025-01-09 14:08:53
推荐回答(3个)
回答1:

练习1-12:
Private Sub Form_Click()
Text1.Move 0, 0
End Sub

Private Sub Text1_Change()
Text1.Move Me.Width - Text1.Width, 0
End Sub

练习1-13:
Private Sub C1_Click()
Text1.Text = LCase(Text1.Text)
Text2.Text = UCase(Text1.Text)
End Sub

练习1-14:
Private Sub Command1_Click()
If Text1.Text <> "计算机等级考试" Then Exit Sub
Text1.Visible = False
Label1.Caption = Text1.Text
Label1.Visible = True
End Sub

练习1-15:
1)把Text1的MultiLine属性设为 True
2)把Text1的ScroolBars属性设为 2 - Vertical
3)把Text1的Text属性设为 程序设计
4)点Text1的Font属性右面的小按钮,在出现的对话框中设置 黑体 和 三号字体
5)把Form1的Caption属性设为 设置文本框属性

练习1-16:
Private Sub Form_Load()
Text1.PasswordChar = "*"
End Sub

Private Sub Text1_Change()
Text2.Text = Text1.Text
End Sub

练习1-17:
Private Sub C1_Click()
Text1.Text = "等级考试"
End Sub
Private Sub C2_Click()
T1.Width = T1.Width * 2
T1.Height = T1.Height * 2
T1.FontSize = T1.FontSize * 3
End Sub

练习1-18:
在Form1上面绘制一个Shape1,然后把他的Shape属性设为 3 - Circle ,接着把Shape1的Height和Width属性都设为1500,然后把窗体的Caption属性设为 圆 ,最后把窗体的MinButton属性和MaxButton属性都设为False.

希望我的回答能帮助你解决问题

回答2:

1-12:
Private Sub Form_Click()
Text1.Move 0, 0
End Sub

Private Sub Text1_Change()
Text1.Move Me.ScaleWidth - Text1.Width, 0
End Sub

1-13
Private Sub C1_Click()
Text1.Text = LCase(Text1.Text)
Text2.Text = UCase(Text1.Text)
End Sub

1-14

Private Sub Command1_Click()
Text1.Visible = False
Label1.Caption = Text1.Text
End Sub

1-15
设置文本框属性:
.MultiLine = True
.ScrollBars = 2
.Text = "程序设计"
窗体 Caption="设置文本框属性"
End Sub

1-16:
设置属性:text1.PasswordChar="*"

Private Sub Text1_Change()
Text2.Text = Text1.Text
End Sub

1-17

Private Sub C1_Click()
Text1.Text = "等级考试"
End Sub
Private Sub C2_Click()
Text2.width=text2.width*2
text2.height=text2.height*2
text2.fontsize=text2.fontsize*3
End Sub

回答3:

都是基础。。