全文预览

Visual Basic课程设计

上传者:火锅鸡 |  格式:doc  |  页数:12 |  大小:0KB

文档介绍
РLabel1.Left = Label1.Left + 15РElseРfx = 1РEnd IfРEnd IfРEnd SubРPrivate Sub Timer4_Timer() 'timer3控制壁面反射式摆动РIf fx = 1 ThenРIf Label1.Left > 0 ThenРLabel1.Left = Label1.Left - 15РElseРfx = 0РEnd IfРElseРIf Label1.Left < (Form2.Width - Label1.Width) ThenРLabel1.Left = Label1.Left + 15РElseРfx = 1РEnd IfРEnd IfРEnd SubРPrivate Sub Timer5_Timer() 'timer5控制颜色自动变化РRandomizeРDim a As Integer, b As IntegerРa = Int(7 * Rnd)Рb = Int(7 * Rnd)РIf a <> b ThenРForm2.BackColor = cor(a)РLabel1.BackColor = cor(a)РLabel1.ForeColor = cor(b)РElseРIf a = 6 ThenРForm2.BackColor = cor(a)РLabel1.BackColor = cor(a)РLabel1.ForeColor = cor(b - 1)РElseРForm2.BackColor = cor(a)РLabel1.BackColor = cor(a)РLabel1.ForeColor = cor(b + 1)РEnd IfРEnd IfРEnd SubРForm3(自定义内置字幕)代码如下:РDim zm(0 To 7) As String '定义数组zm,存储自定义内置字幕

收藏

分享

举报
下载此文档