如何用Timer的Interval的属性或其他属性来显示进度条?

解决方案 »

  1.   

    跟Timer没用关系,只跟你的ProgressBar控件有关。
    visible Max Min Value 就可以搞定
      

  2.   

    Timer的Interval的属性是用来设置Timer事件时间间隔的,即多长时间激发一次Timer事件,进度的测量一般可根据总时间和已消耗时间的比或文件的总长度和已完成(比如下载)的比例决定.Timer控件是用来记录时间的,Interval是用来决定数据更新的频率的.进度取决于总时间(一般对应于进度条的最大值)和实际消耗的时间
      

  3.   

    progressbar.max进度条的最大值
    progressbar.value当前进度值,值到max进度条就满了
      

  4.   

    Private Sub Form_Load()
    Timer1.Interval = 1000
    End SubPrivate Sub Timer1_Timer()
    Time = DateAdd("s", 1, Time)
    End SubPrivate Sub Command1_Click()
    ProgressBar1.Value = Time
    End Sub
    这种设法怎么无反应啊?
      

  5.   

    ProgressBar1.Value要的是整形,楼主为何要强加一时间型给它呢?如果实在要想与时间有关那不如用Timer,
      

  6.   


    Option ExplicitPrivate initValue As LongPrivate Sub Form_Load()
       Timer1.Interval = 1000
    End SubPrivate Sub Timer1_Timer()
      ProgressBar1.Value = CLng(Timer) - initValue
      Debug.Print ProgressBar1.Value
    End SubPrivate Sub Command1_Click()
       initValue = CLng(Timer)
       Timer1.Enabled = True
       ProgressBar1.Min = 0
       ProgressBar1.Max = 100
    End Sub
      

  7.   

    Time = DateAdd("s", 1, Time) 
    你这个返回值是DATA类型
    ProgressBar1.Value这个是int型。
    你的意思是让1秒钟,进度条走一格?
    如果是的话这样实现:
    Private Sub Timer1_Timer() 
    if ProgressBar1.Value>=ProgressBar1.max then 
       timer1.enable=false
       ProgressBar1.Value=ProgressBar1.max
    else 
       ProgressBar1.Value=ProgressBar1.Value+1
    end if
    End Sub 
    明白这个意思没?就是一秒钟让他的value加个1