vb操作html5,vb基本操作

1.选中部分的长度。 Text2 = Text1.SelLength

2.text1中的字母变成小写,text2中的字母变成大写.

Text1.Text = LCase(Text1.Text)

Text2.Text = UCase(Text1.Text)

3.在文本框中显示。 If Option1 Then

Text1 = List1.Text & Option1.Caption

Else

Text1 = List1.Text + Option2.Caption

End If

4.单击交换图片。 P1.Picture = LoadPicture("pic2.jpg")

P2.Picture = LoadPicture("pic1.bmp")

5.通过复选框选课.Private Sub C1_Click()

Dim s1 As String

s1 = "我选的课是"

If Ch1.Value = 1 And Ch2.Value = 0 Then

Text1 = s1 & Ch1.Caption

ElseIf Ch1.Value = 0 And Ch2.Value = 1 Then

Text1 = s1 & Ch2.Caption

Else

Text1 = s1 & Ch1.Caption & Ch2.Caption

End If

End Sub

6.Array?

7.选择组合框中的一个项目,计算正余弦值。

If Combo1.ListIndex = 0 Then

Text2 = Fix(Sin(Val(Text1) / 180 * 3.14159) * 1000) / 1000 ElseIf Combo1.ListIndex = 1 Then

Text2 = Fix(Cos(Val(Text1) / 180 * 3.14159) * 1000) / 1000 End If

8.通过右击打开菜单。 If Button = 2 Then

Me.PopupMenu Format

End If

9.单击载入图片。Image1.Picture = LoadPicture(App.Path & "\MISC34.ico")

10.单击清除。Set Image1.Picture = Nothing

11.运行滚动条。HScroll1.SetFocus

12.显示滚动条所在位置。Text1.Text = HScroll1.Value

13.滚动条右移。HS1.Value = HS1.Value + 10

14.标签显示当前时间或日期。Label1 = Date Label1 = Time

15.设置背景为红色。Form1.BackColor = &HFF&

16.单击窗体显示对话框。InputBox "请输入", "等级考试", "Basic"

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值