使用access数据库,将所有题都事先输入在题库中,在软件运行过程中从题库中随即抽取题目,输出到窗体上!
比如试题表Question
可能会有的字段
字段 类型 备注
ID int 自增量
Content string 问题描述
Type byte 问题类型,1填空题,2选择题,3问答题
大概这些,可能根据出的问题不同有更详细字段
背景音乐你可以给窗体上放一个windows media player控件,设置为不可见,然后让这个控件放歌就可以了!
Begin VBForm Form1
Caption = "Form1"
ClientHeight = 3150
ClientLeft = 1155
ClientTop = 1530
ClientWidth = 4215
LinkTopic = "Form1"
ScaleHeight = 3150
ScaleWidth = 4215
Begin VBCommandButton Command2
Caption = "退出"
Height = 495
Left = 960
TabIndex = 4
Top = 2400
Width = 2775
End
Begin VBCommandButton Command1
Caption = "处理"
Height = 735
Left = 2640
TabIndex = 3
Top = 240
Width = 1095
End
Begin VBTextBox Text3
Height = 1215
Left = 960
TabIndex = 2
Top = 1080
Width = 2775
End
Begin VBTextBox Text2
Height = 270
Left = 960
TabIndex = 1
Top = 600
Width = 1575
End
Begin VBTextBox Text1
Height = 270
Left = 960
TabIndex = 0
Top = 240
Width = 1575
End
Begin VBLabel Label3
Caption = "结果"
Height = 375
Left = 360
TabIndex = 7
Top = 1080
Width = 375
End
Begin VBLabel Label2
Caption = "字符2"
Height = 255
Left = 360
TabIndex = 6
Top = 600
Width = 495
End
Begin VBLabel Label1
Caption = "字符1"
Height = 255
Left = 360
TabIndex = 5
Top = 240
Width = 495
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Text3Text = Text1Text & " " & Text2Text
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Command1_Click()
If Text1Text <> "" Then
a = Val(Text1Text)
Else
a = -Val(Text2Text)
End If
If Text3Text <> "" Then
b = Val(Text3Text)
Else
b = -Val(Text4Text)
End If
c = Abs(a - b)
If c > 180 Then c = 360 - c
Text5Text = c 2 31415926 6378137 / 360
End Sub
求采纳为满意回答。
首先在窗体上新建时间和你那小汽车的控件,在我的代码里,小汽车的控件名称为label1
然后设置时间控件的时间间隔属性为100即01秒,把可编辑属性调为false
然后在代码区域打上以下的代码,
Private Sub Command1_Click()
Timer1Enabled = True
End Sub
Private Sub Command2_Click()
Timer1Enabled = False
End Sub
Private Sub Timer1_Timer()
Label1Left = Label1Left + 20
End Sub
以上就是关于vb小程序设计实例全部的内容,包括:vb小程序设计实例、利用VB设计一程序、用vb设计程序,题目如下等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)