| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1265 人关注过本帖
标题:我是初学着,而且是自学的,现在有个问题请教下啊,里面的i值是什么啊?
取消只看楼主 加入收藏
wangkaicosl
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2015-1-12
结帖率:100%
收藏
已结贴  问题点数:20 回复次数:0 
我是初学着,而且是自学的,现在有个问题请教下啊,里面的i值是什么啊?
Public Class Form1
    Dim i0, i1, i2, i3, x As Integer
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Me.Load

        x = 400
        i1 = Val(TextBox1.Text)
        i2 = Val(TextBox2.Text)
        i3 = Val(TextBox3.Text)
        i0 = i1 + i2 + i3 + i2
        Timer1.Interval = 100
    End Sub

    Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        Static i As Integer, dx%
        Dim k%
        i = i + 1
        If i <= i1 * 10 Then
            PictureBox4.Image = PictureBox1.Image
            k = 1
        ElseIf i <= (i1 + i2) * 10 Then
            PictureBox4.Image = PictureBox2.Image


            k = 2
        ElseIf i <= (i1 + i2 + i3) * 10 Then
            PictureBox4.Image = PictureBox3.Image
            k = 3
        ElseIf i <= i0 * 10 Then
            PictureBox4.Image = PictureBox2.Image
            k = 2
            If i = i0 * 10 Then i = 0

        End If
        If k = 3 Then
            If dx < 4 Then dx = dx + 1
        Else
            If x > 130 Or x < 100 Then
                dx = 4
            ElseIf x > 120 Then
                dx = 3
            ElseIf x > 110 Then
                dx = 2
            ElseIf x > 100 Then
                dx = 1
            Else
                dx = 0
            End If
        End If
        x = x - dx
        If x <= -100 Then x = 400
        PictureBox5.Left = x
    End Sub
End Class
搜索更多相关主题的帖子: Object 而且 
2015-01-15 16:23
快速回复:我是初学着,而且是自学的,现在有个问题请教下啊,里面的i值是什么啊 ...
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.028209 second(s), 10 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved