Đang Thực Hiện

229098 progress bar backgroundworker

I have a button (btnUpdate) on a form where I am calling a function. The function updates or add records to local sql server table using web services. I put a progress bar but it's not working. I think because I dont have the max number. Attached text file is the function. All the background and progress stuff codes are shown here.

Private Sub btnSyncNew_Click(ByVal sender As [url removed, login to view], ByVal e As [url removed, login to view]) Handles [url removed, login to view]

[url removed, login to view]()

End Sub

Private Sub BackgroundWorker1_DoWork(ByVal sender As [url removed, login to view], ByVal e As [url removed, login to view]) Handles [url removed, login to view]

Dim worker As [url removed, login to view] = DirectCast(sender, [url removed, login to view])

For i As Integer = 1 To 1

'Raise the ProgressChanged event in the UI thread.

[url removed, login to view](i, i & " iterations complete")

'Perform some time-consuming operation here.

Dim cSessionID = [url removed, login to view]

Dim objMySlip As New clsSyncSlip()

Dim sResult As Integer

sResult = [url removed, login to view](cSessionID)

'MsgBox("Total " & sResult & " slip(s) have been updated")

[url removed, login to view](0)

Next i

MsgBox("done")

End Sub

Private Sub BackgroundWorker1_ProgressChanged(ByVal sender As [url removed, login to view], ByVal e As [url removed, login to view]) Handles [url removed, login to view]

[url removed, login to view] = [url removed, login to view]

[url removed, login to view] = TryCast([url removed, login to view], String)

End Sub

Private Sub BackgroundWorker1_RunWorkerCompleted(ByVal sender As [url removed, login to view], ByVal e As [url removed, login to view]) Handles [url removed, login to view]

[url removed, login to view] = "Operation complete"

End Sub

link for the class [url removed, login to view]

Kĩ năng: .NET, Bất kì công việc gì, SQL

Xem nhiều hơn: topco, e scriptlance, sql server max, max sql server, slip, bar file, bar codes, amp sql net web, web progress, web progress bar, object background, sql operation, net progress bar, net threading, net progress, string integer, text sender, local http server, net calling, link bar, backgroundworker class, thread worker, backgroundworker, next bar, button thread

Về Bên Thuê:
( 4 nhận xét ) Houston, United States

ID dự án: #1975340

Được trao cho:

AgNO3

Please check PMB.

$20 USD trong 2 ngày
(0 Đánh Giá)
0.0