要预先知道读取纪录的时间恐怕有困难。但用进度条匀速来回跑,最后计算出时间,下面的函数可能可以用:
Private Declare Function CreateThread Lib "Kernel32" (ByVal lpThreadAttributes As Any, ByVal dwStackSize As Long, ByVal lpStartAddress As Long, lpParameter As Any, ByVal dwCreationFlags As Long, lpThreadId As Long) As Long
我以前在VB程序中用过,比DoEvents效果好多了,据说在VB6中属于“伪线程”,但确实在短促的读磁盘时不能显示多线程的效果。其他方面就同多线程一样。