M
MosheS Singer
Guest
the MainFrm_Load of my project contains many code and it take much longer than usual to run
so i placed part of the code in a BackgroundWorker
as you see from the following sample
Dim c As New ClsSmWrk
If Not c.BWFrsPrtOfLd.IsBusy = True Then c.BWFrsPrtOfLd.RunWorkerAsync()
End If
Public Class ClsSmWrk
Public WithEvents BWFrsPrtOfLd As New BackgroundWorker
Private Sub BWFrsPrtOfLd_DoWork(ByVal sender As Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BWFrsPrtOfLd.DoWork
Call MainFrm.LoadFncP()
End Sub
the function of the code is to load data into all fields and controls
the problem is that
if the code runs from a BackgroundWorker, and it not load any Data in Any field
but if i run the same code from a control button it works perfectly
Looking Forward to a quick solution
Continue reading...
so i placed part of the code in a BackgroundWorker
as you see from the following sample
Dim c As New ClsSmWrk
If Not c.BWFrsPrtOfLd.IsBusy = True Then c.BWFrsPrtOfLd.RunWorkerAsync()
End If
Public Class ClsSmWrk
Public WithEvents BWFrsPrtOfLd As New BackgroundWorker
Private Sub BWFrsPrtOfLd_DoWork(ByVal sender As Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BWFrsPrtOfLd.DoWork
Call MainFrm.LoadFncP()
End Sub
the function of the code is to load data into all fields and controls
the problem is that
if the code runs from a BackgroundWorker, and it not load any Data in Any field
but if i run the same code from a control button it works perfectly
Looking Forward to a quick solution
Continue reading...