Solved

image, or scrollbar not working.

Posted on 2004-10-20
3
181 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VB.NET return row from SQL to DataSet and get column values ? 3 97
vb.net 1 month apart 11 35
MailAddress in vb 4 29
VB.Net - String Manipulation Scenario 2 25
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…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

839 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