Solved

image, or scrollbar not working.

Posted on 2004-10-20
3
174 Views
Last Modified: 2010-04-23
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.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
       "Data Source=" & DBNAME & ";Persist Security Info=False"

        'Application.DoEvents()
        Me.OleDbDataAdapter1.Fill(Me.DbDataSet)

        '// 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
0
Comment
Question by:malanois
  • 2
3 Comments
 

Author Comment

by:malanois
ID: 12361711
This is another way I have tried it:

   Private Sub StartDoWork()
        Dim workThread = New Threading.Thread(AddressOf Me.DoWork)
        workThread.background = True
        workThread.Start()
    End Sub

    Private Sub DoWork()

        threadactive = True

        Application.DoEvents()

        showimage()

        'Dim workThread = New Threading.Thread(AddressOf Me.showimage)
        'workThread.Start()

        Me.DbDataSet.Clear()

        Me.OleDbConnection1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
       "Data Source=" & DBNAME & ";Persist Security Info=False"

        'Application.DoEvents()
        Me.OleDbDataAdapter1.Fill(Me.DbDataSet)

        '// Do your work here

        hideimage()
        threadactive = False
    End Sub
0
 
LVL 7

Accepted Solution

by:
J_Mak earned 500 total points
ID: 12366235
I'm assuming that the image is inside a picture box and is in the same location as the datagrid, is that correct? If so, then would it be ok if you make the picture opaque so that you can see through it and consequently see the datagrid? Or vice versa.

Try this:

http://www.dotnet247.com/247reference/msgs/18/93025.aspx
0
 

Author Comment

by:malanois
ID: 12402559
Still not work.  Image just freezes during the .fill process
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now