Link to home
Start Free TrialLog in
Avatar of Ernesto
ErnestoFlag for Mexico

asked on

update label text

Hi all experts
how can i update the label text when a process take place, it's update at the end of the process in a do while statement, im pass the code in the part that im call the label whit the text i need it, but puts the text until the end of the process and i need it at the begining

thank you a lot

Do While b
                a = Maestro.Item(0, c).Value
                If a = "T" Then

                    Label3.Text = "Migrando SPEC " & Maestro.Item(1, c).Value & " por favor espere...."

                    cn5.Open()

                    Dim qry4 As String = "delete  from  proj.pipe_padp"
                    Dim cmd4 As New OleDbCommand(qry4, cn5)
                    estatus = CInt(cmd4.ExecuteScalar())
                    ProgressBar1.Value = 1

                    Dim qry6 As String = "INSERT INTO [1010].proj.PIPE_PADP SELECT * FROM [PASO1008].proj.PIPE_PADP "
                    Dim cmd6 As New OleDbCommand(qry6, cn5)
                    estatus = CInt(cmd6.ExecuteScalar())
                    ProgressBar1.Value = 2

Open in new window

Avatar of sabeesh
sabeesh
Flag of United States of America image

You can crate a background worker thread and update the label text using this thread.
ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America 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
Avatar of Ernesto

ASKER

okey
code code pleasee
Avatar of Ernesto

ASKER

ok
got it
thank you a lot