本栏目下题库来源于互联网,轻速云承诺对于用户导入平台的题库是严格保密的,不会在此呈现!
轻速云给您提供更好的在线考试系统服务!
二级VB上机题库5
1、【 简答题
    [10分]
解析:
Private Sub HScroll1_Change()
  Text1 = HScroll1
End Sub
VERSION 5#
Begin VB.Form Form1
  Caption = "Form1"
  ClientHeight = 1935
  ClientLeft = 60
  ClientTop = 345
  ClientWidth = 4380
  LinkTopic = "Form1"
  ScaleHeight = 1935
  ScaleWidth = 4380
  StartUpPosition = 3    '窗口缺省
  Begin VB.TextBox Text1
      Height = 375
      Left = 1560
      TabIndex = 1
      Top = 360
      Width = 1335
  End
  Begin VB.HScrollBar HScroll1
      Height = 375
      LargeChange = 50
      Left = 480
      Max = 1500
      Min = 1000
      SmallChange = 2
      TabIndex = 0
      Top = 1080
      Value = 1000
      Width = 3375
  End
End
Private Sub HScroll1_Change()
  Text1 = HScroll1
End Sub
2、【 简答题
   
Private Type PalInfo
    Name As String * 8
    Tel As String * 10
    Post As Long
End Type
Dim pal As PalInfo
Private Sub Command2_Click()
    ch$ = ""
    For k = 1 To Len(Text1.Text)
        C$ = Mid$(Text1.Text, k, 1)
        If C$ >= "0" And C$ <= "9" Or C$ >= "a" And C$ <= "z" Or C$ >= "A" And C$ <= "Z" Then
            ch$ = ch$ + C$
        End If
    Next k
    Open App.Path & "\out5.txt" For Output As #1
    Print #1, ch$
    Close #1
End Sub [10分]
解析:
Private Sub Command1_Click()
'考生应编写的程序
    Open App.Path & "\in5.txt" For Random As #1 Len = Len(pal)
    For i = 1 To 5
        Get #1, i, pal
        Text1.Text = Text1.Text & pal.Name
        Text1.Text = Text1.Text & pal.Tel
        Text1.Text = Text1.Text & Str(pal.Post)
        Text1.Text = Text1.Text + vbCrLf
    Next
    Close 1
End Sub
3、【 简答题
   Private Type Paltype
    Name As String * 8
    Tel As String * 10
    Post As Long
End Type [10分]
解析:
'考生编写如下事件过程的程序(Command1_Click)
Private Sub Command1_Click()
    Dim Pal As Paltype
    Open App.Path & "\in5.txt" For Random As #1 Len = Len(Pal)
    Get #1, 3, Pal
    Text1.Text = Pal.Name
    Text2.Text = Pal.Tel
    Text3.Text = Str(Pal.Post)
    Close 1
End Sub
Private Sub Command2_Click()
    Open App.Path & "\out5.txt" For Output As #1
    Print #1, Text1.Text, Text2.Text, Text3.Text
    Close 1
End Sub
4、【 简答题
   Private Sub C1_Click()
'题目:
'    For i = ? To ?
'        If Op1(i).? = True Then
'            Print "我是" + Op1(i).?
'        End If
'    Next [10分]
解析:
'正确程序:
    For i = 0 To 2
        If Op1(i).Value = True Then
            Print "我是" + Op1(i).Caption
        End If
    Next
End Sub
'答案:
'0
'2
'value
'Caption
5、【 简答题
    [10分]
解析:
Private Sub HScroll1_Change()
    Timer1.Interval = HScroll1.Value
End Sub
Private Sub Timer1_Timer()
    Image1.Visible = Not Image1.Visible
End Sub
6、【 简答题
    [10分]
解析:
Private Sub Form_Click()
    'Form1.C1.Left = 100 + Me.C1.Left
    'Me.C1.Top = 100 + Form1.C1.Top
    C1.Move 100 + C1.Left, 100 + C1.Top
End Sub
7、【 简答题
   Private Sub HScroll1_Change()
'    Text1.FontSize = ?
    If List1.Text <> "" Then
'        Text1.FontName = ?
    Else
        MsgBox "请选择字体", , ""
    End If
End Sub [10分]
解析:
Private Sub HScroll1_Change()
    Text1.FontSize = HScroll1.Value
    If List1.Text <> "" Then
        Text1.FontName = List1.Text
    Else
        MsgBox "请选择字体", , ""
    End If
End Sub
8、【 简答题
   Private Sub Command1_Click()
    Timer1.Enabled = True
End Sub
Private Sub Timer1_Timer()
'    If Val(?) = 0 Then
        Text1.Text = ""
'        Timer1.? = False
'        Text1.?
    Else
        Text1.Text = Str(Val(Text1.Text) - 1)
    End If
End Sub [10分]
解析:
Private Sub Command1_Click()
    Timer1.Enabled = True
End Sub
Private Sub Timer1_Timer()
    If Val(Text1.Text) = 0 Then
        Text1.Text = ""
        Timer1.Enabled = False
        Text1.SetFocus
    Else
        Text1.Text = Str(Val(Text1.Text) - 1)
    End If
End Sub
9、【 简答题
    [10分]
解析:
Private Sub HScroll1_Change()
    Label1.Left = Me.HScroll1
End Sub
Private Sub HScroll1_Scroll()
    Label1.Left = Form1.HScroll1
End Sub
1
1页,共9个题库
1页,共9个题库
轻速云给您提供更好的在线考试系统服务!
推荐
推荐题库
众多企事业单位的信赖之选
36万+企事业单位的共同选择
查看更多合作案例
众多企事业单位的信赖之选
开始使用轻速云组织培训考试
四步组织一场考试答题,一键搭建企业培训平台
免费使用 免费使用 预约演示
咨询热线
400-886-8169
周一到周日 8:00-22:00
©2023 轻速云 苏ICP备16049646号-1 轻速云科技提供专业的在线考试系统、在线培训系统
联系我们
客服热线客服热线:400-886-8169 | 周一至周日 8:00-22:00
©2023 轻速云 苏ICP备16049646号-1
轻速云科技提供专业的在线考试系统、在线培训系统
在线咨询 400-886-8169