![]() ![]() ![]() So the function works, when this window is opened it starts to read the log file and updates a textbox with all of the rows currently read, but I also want it to update a progress bar in my main thread called crunchingProgress. Private Sub BackgroundWorker1_RunWorkerCompleted(ByVal sender As Object, ByVal e As RunWorkerCompletedEventArgs) Handles BackgroundWorker1.RunWorkerCompleted 'Me.crunchingProgress.Value = e.ProgressPercentage Private Sub BackgroundWorker1_ProgressChanged(ByVal sender As Object, ByVal e As ProgressChangedEventArgs) Handles BackgroundWorker1.ProgressChanged ![]() 'BackgroundWorker1.ReportProgress(e.percentProgress) ![]() OngoingLog.AppendText(objReader.ReadLine) Private Sub BackgroundWorker1_DoWork(ByVal sender As System.Object, ByVal e As DoWorkEventArgs) Handles BackgroundWorker1.DoWorkÄim FileLength As Long = New System.IO.FileInfo(logfile).LengthÄim objReader As New System.IO.StreamReader(logfile) Lets say as an example the work needs to be done every 60 seconds, well the timer can tick every second and it can update the progress bar but then on its 60th tick (or after a minutes has expired) it runs the work and. The code that I'm working with looks like this: Protected Overrides Sub OnLoad(ByVal e As System.EventArgs) when it ticks its updates the progress bar as normal but then when it ticks say the tenth time then it runs some other code. Having never really made a full out desktop application, I'm hitting a number of stumbling blocks, so please forgive me if my questions a very uninformed I'm learning to walk while running. I am trying to build a log parser in VB.Net that will take IIS logs and insert them into a database. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |