Solved

image, or scrollbar not working.

Posted on 2004-10-20
3
182 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

763 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