dnf黄字会冲突吗:vb滚动条(运行有问题,先让字体改变,但用滚动条一拉就出现数字)

来源:百度文库 编辑:神马品牌网 时间:2024/04/28 19:07:33
Private Sub Command1_Click()
If Option1 Then
Text1.FontName = "arial black"
Else
Text1.FontName = "arial"
End If
If Option3 Then
Text1.FontSize = 16
Else
Text1.FontSize = 24
End If
End Sub

Private Sub Command2_Click()
End
End Sub

Private Sub Form_Load()
Form1.Caption = "框架用法示列"
Command1.Caption = "确定"
Command2.Caption = "结束"
Frame1.Caption = "字体类型"
Frame2.Caption = "字体大小"
Option1.Caption = "魏碑"
Option2.Caption = "幼圆"
Option3.Caption = "16"
Option4.Caption = "24"
Text1.Text = "visual basic 程序设计"
End Sub

Private Sub HScroll1_Change()
Text1.Text = HScroll1.Value

End Sub

Private Sub VScroll1_Change()

End Sub
因为字体已超出文本框范围,我想用滚动条拉出来看后面的东西,但一拉就显示数字,杂回事阿??

我不明白你的问题
Private Sub HScroll1_Change()
Text1.Text = HScroll1.Value '这个地方不就是要得到HScroll1的值么
'当然会出现数字了
End Sub

Text1.Text = HScroll1.Value 就是因为 这句话,
如果你想用它来移动文本,个人建议你就别用这个滚动条。把TEXT的MultiLine设置为True
再设置scrollbars为2.就可以达到了。
如果想用HScroll来改变字体大小 就应该这样写,
text1.fontsize = HScroll1.Value