malanois
asked on
image, or scrollbar not working.
Situation:
need to show image while doing a .fill
I have tried hiding the datagrid and making the images visible. that didnt work at all.
I tried creating a thread to show image then fill the hide image. That worked good. However when I do that the datgrid has dual vertical scroll bars.
so itried to create the thread inside my sub, same result.
Application.doevents hasnt helped.
' Private Sub StartDoWork()
' Dim workThread = New Threading.Thread(AddressOf Me.showimage) < I have changed this several times
' showimage()
' workThread.Start()
' hideimage()
' End Sub
Private Sub DoWork()
threadactive = True ' just for me to know the fill is progress
Application.DoEvents()
showimage()
'Dim workThread = New Threading.Thread(AddressOf Me.showimage)
'workThread.Start()
Me.DbDataSet.Clear()
Me.OleDbConnection1.Connec tionString = "Provider=Microsoft.Jet.OL EDB.4.0;" & _
"Data Source=" & DBNAME & ";Persist Security Info=False"
'Application.DoEvents()
Me.OleDbDataAdapter1.Fill( Me.DbDataS et)
'// Do your work here
hideimage()
threadactive = False
End Sub
Public Sub showimage() <-- To show and hide images
Me.DataGrid.Hide()
search_lbl.Show()
showbx.Show()
showbx1.Show()
End Sub
Public Sub hideimage()
Me.DataGrid.Show()
search_lbl.Hide()
showbx1.Hide()
showbx.Hide()
End Sub
need to show image while doing a .fill
I have tried hiding the datagrid and making the images visible. that didnt work at all.
I tried creating a thread to show image then fill the hide image. That worked good. However when I do that the datgrid has dual vertical scroll bars.
so itried to create the thread inside my sub, same result.
Application.doevents hasnt helped.
' Private Sub StartDoWork()
' Dim workThread = New Threading.Thread(AddressOf
' showimage()
' workThread.Start()
' hideimage()
' End Sub
Private Sub DoWork()
threadactive = True ' just for me to know the fill is progress
Application.DoEvents()
showimage()
'Dim workThread = New Threading.Thread(AddressOf
'workThread.Start()
Me.DbDataSet.Clear()
Me.OleDbConnection1.Connec
"Data Source=" & DBNAME & ";Persist Security Info=False"
'Application.DoEvents()
Me.OleDbDataAdapter1.Fill(
'// Do your work here
hideimage()
threadactive = False
End Sub
Public Sub showimage() <-- To show and hide images
Me.DataGrid.Hide()
search_lbl.Show()
showbx.Show()
showbx1.Show()
End Sub
Public Sub hideimage()
Me.DataGrid.Show()
search_lbl.Hide()
showbx1.Hide()
showbx.Hide()
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Still not work. Image just freezes during the .fill process
ASKER
Private Sub StartDoWork()
Dim workThread = New Threading.Thread(AddressOf
workThread.background = True
workThread.Start()
End Sub
Private Sub DoWork()
threadactive = True
Application.DoEvents()
showimage()
'Dim workThread = New Threading.Thread(AddressOf
'workThread.Start()
Me.DbDataSet.Clear()
Me.OleDbConnection1.Connec
"Data Source=" & DBNAME & ";Persist Security Info=False"
'Application.DoEvents()
Me.OleDbDataAdapter1.Fill(
'// Do your work here
hideimage()
threadactive = False
End Sub