Link to home
Start Free TrialLog in
Avatar of Fordraiders
FordraidersFlag for United States of America

asked on

Processing Please Wait Form: While routine is running

vb.net 2003

What I have:

I have a form called
frmWait

Label called  lblMessage

What I need:
While I'am running routines in my code. I want to be able to call this form. display it. Sort of like a progress bar. Saying..."Processing please wait" ....
and a bonus having  the dots go back and forth ....    ...   .    .... ..   .   etc  
When the routine is done:
frmWait  closes.

Thanks
fordraiders



ASKER CERTIFIED SOLUTION
Avatar of theGhost_k8
theGhost_k8
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
As theGhost menitioned, an animated GIF on a label sounds like it would fit your needs admirably.
The success of this really depends on ~WHAT~ the "running routines" are doing.  You may have to move that code to another thread...

Can you give us more details?
Mike,

You big sissy. He doesn't _have_ to use multi-threading. :P

Now, whether he _should_ or not is another story entirely.

However, I figured if he was throwing up a "wait" form, there was probably a bunch of processing going on that the user needs to wait on... (I know, I know... assumptions....)

Jeff
Lol@Jeff...   ;)

I thought I had seen posts before where making callls to databases and what not have made animated GIFs stop animating...would have to check on that.  Blocking database calls would also stop the Form from processing Timer tick events as well.

If he just has some intensive loops then we can just throw Application.DoEvents() in there and "call it good".

Like I said, it just depends on what you're doing...but I never said anything was wrong with the previous posts!  =)
Avatar of Fordraiders

ASKER

example loop:
looping through  10,000 records ....
 
Private Sub SnR()
              ' Using Access Database Search and Replace
        Dim conn As System.Data.OleDb.OleDbConnection
        Dim tblCriteria As New DataTable
        Dim tblData As New DataTable

        conn = New System.Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\DM\Sku.mdb")
        'make dataadapters
        Dim dac As New System.Data.OleDb.OleDbDataAdapter("SELECT fldCid, fldFindMe, fldReplaceWith FROM tblCriteria", conn)
        Dim dad As New System.Data.OleDb.OleDbDataAdapter("SELECT fldID, fldDid, fldMfgname, fldMfrnum, fldDescription FROM tblData", conn)
        Dim cb As New System.Data.OleDb.OleDbCommandBuilder(dad)
        'get the datables from Access
        dac.Fill(tblCriteria)
        dad.Fill(tblData)
        'revise the data
        Me.Label18.Text = "Step 5 of 8 :Replacing Words"
        Me.Label18.Refresh()
        'send updated table back to Access
        For Each drc As DataRow In tblCriteria.Rows
            For Each drd As DataRow In tblData.Rows
                drd("fldDescription") = ReplaceWords(drd("fldDescription"), drc("fldFindMe"), drc("fldReplaceWith")) '<------- your procedure
            Next
        Next
        dad.Update(tblData)
         End Sub

to all
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
To All,   from
Ghost KB
1) you can place a GIF for ... on a label
2) manually use timer control to handle number of dots..
??  How to do this or example...
thnx 4 pts, but its not "Ghost KB"
its theGhost<UNDERSCORE>k8.
             ;)