VB模拟洗衣机自动加水抽水功能.rar

时间:2022-07-30 03:21:17
【文件属性】:

文件名称:VB模拟洗衣机自动加水抽水功能.rar

文件大小:4KB

文件格式:RAR

更新时间:2022-07-30 03:21:17

VB源码-游戏编程

VB模拟洗衣机,哈哈,还没听说过吧,可模拟出洗衣机自动加水抽水的功能,还有动画演示效果,符合VB结构化程序的特点,简单易懂,同时采用了通用的小游戏循环方式。代码片段:   Dim WarterHeight As Single '水高度   Dim DiBuH As Single '底部高度   Dim KGJiashui As Integer '进水开关   Dim KGChushui As Integer '出水开关   Dim shuiguanColor As Long '水管颜色   Dim shuiguanColorWarter As Long '水管有水时候的颜色   Dim JiashuiV As Single '加水速度   Dim ChushuiV As Single '出水速度   Dim inRun As Boolean '运行中,洗衣机已经启动了   Dim ShengyuTime As Single '剩余时间   Dim SheDingTime As Single '设定时间   Dim ShengyuCishu As Single '剩余次数   Dim Huanshui As Boolean '换水状态   Dim mOk As Boolean '完成   Dim OneRun As Boolean '首次运行   Dim HuanshuiNum As Integer '换水完成 0-放水,1-进水   WarterHeight = 0 '起始水量    JiashuiV = 20 '加水的速度    ChushuiV = 21 '出水的速度    shuiguanColor = Line1.BorderColor '水管的颜色    shuiguanColorWarter = Picture2.BackColor '水管有水的颜色    DiBuH = Picture2.Top Picture2.Height '洗衣机底部高度    With labShijian '移动显示时间的lab与设置时间的txt位置相同    .Move TxtShijian.Left, TxtShijian.Top, TxtShijian.Width, TxtShijian.Height    End With    With labCishu '移动显示次数的lab与设置次数的txt位置相同    .Move TxtCishu.Left, TxtCishu.Top, TxtCishu.Width, TxtCishu.Height    End With    SheDingTime = 60: ShengyuCishu = 2    TxtShijian = SheDingTime: TxtCishu = ShengyuCishu '开始运行时,默认的设置时间和次数    inRun = False '洗衣机非运行状态


【文件预览】:
codesc.net
----自动洗衣机()
--------Form1.frm(11KB)
--------工程1.vbp(605B)
--------MSSCCPRJ.SCC(190B)
--------工程1.vbw(54B)

网友评论