还是关于进度条的问题!
移植了一位大神的代码,但是在实际应用中,真正在执行代码的时候进度条不动作,如果在打开窗体不执行任何操作的时候是可以动作的!是电脑的问题还是资源分配的问题?
dBar.rar
(7.9 KB)
附部分代码:
Dim conn As ADODB.Connection
Set conn = New ADODB.Connection
Dim intloop As Integer
Dim kill As Integer
kill = 0
dBar1.BeginDisplay
dBar1.SetFocus
Constr = "Provider=Microsoft.ACE.OLEDB.12.0;;Data Source='" & App.Path & "\datas\Data_Source.mdb" & "';Persist Security Info=False"
conn.Open Constr
If rst.State = adStateOpen Then rst.Close
rst.Open "SELECT * FROM MsysObjects", conn, adOpenKeyset, adLockOptimistic
.
.执行大量的导入或者是查询任务
.
dBar1.endDisplay