Using Report Progress From Another Class?

Jun 23, 2009

I have a program that downloads information from another class, specifically it collects domain names.So i have a class called domainscraper....on my main form I have a background worker and progressbar, and i put this in the dowork event:DomainCollector.GetDomainsByMethod(parameter)Now my question is, how could I report progress to my progress bar on form1.vb from that method I use in the the domainscraper class (domainscraper.vb).

View 5 Replies


ADVERTISEMENT

VS 2008 Implement A BGW And Want To Report Progress To A Progress Bar For TextFieldParser Program?

Feb 14, 2012

I am trying to implement a BGW and want to report progress to a progress bar for my TextFieldParser program, sometimes if your opening very large files it takes a while and I would like the user to be able to see the progress and have some interaction so they know the program is still running I am a little hung up on what to in the reportprogress

I have:

worker.ReportProgress(0, myReader.ReadFields())

and its not doing anything, I didnt expect it too since ReadFields is an array

parser
Private Sub BackgroundWorker1_DoWork(ByVal sender As Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork
Dim worker As System.ComponentModel.BackgroundWorker = DirectCast(sender, System.ComponentModel.BackgroundWorker)

[code]....

View 6 Replies

Backgroundwoker Report Progress?

Mar 9, 2012

i have problem with the reportprogress / progress changed.i use the backgroundworker in a form class named frame menu. the do work sub of the backgroundworker calls a sub X in a public module.

from the backgroundworker do work sub i am able to use the backgroundworker.reportprogress / backgroundworker progress change method and this is displayed on my form.

when i am using the backgroundworker.reportprogress / backgroundworker progress change method from the sub X it does not display on my form.

when i debug the code it calls the backgroundworker.reportprogress / backgroundworker progress change method correctly in the sub X but just does not display it on the form.

[Code]...

View 5 Replies

Backgroundworker Is Not Set To Report Progress?

Jan 6, 2010

I am using backgroundworker thread in my app. I also have a class in my project and am able to updated the user UI from the form, but most of my time consuming operation happens in the class so I tried to do an update like this Form1.BackgroundWorker1.ReportProgress(4, strname), but I get an error that say that the backgroundworker is not set to report progress.

I have this set in the load event for the app.Are you not able to call form items like this from a class?

View 4 Replies

How To Report Progress Changed

Mar 31, 2009

I need to report progress changed. Consider the following code:

Public Class Calculator
Public Event CalculationProgress (ByVal sender As Object, ByVal e As MyCalculationProgressEventArgs)
Public Function Calculate(..)..
' Perform calculation here ...

[code]....

How and where should I subscribe to CalculationProgress event to call

calculationWorker.ReportProgress(MyCalculationProgressEventArgs.Percent)

View 2 Replies

C# - Report Progress From TableAdapter.Update

Mar 6, 2012

I am writing some data to my Database using TableAdpater.Update and the operation can take up to one minute to complete.

Is there some way to report the progress of this to the user because they think it has stopped responding.

View 1 Replies

Report Progress Of Unit Test?

Oct 5, 2010

Is there currently any possible way to report progress of my unit test? I have a test that could take up to a hour, and I don't want to sit there not knowing what % it is done with. I have tried writing with debug.print and trace.writeline, neither of which seem to work.

View 1 Replies

VS 2008 Defrag With Progress Report?

Jun 9, 2010

I was wondering if there was a way to call defrag.exe from my vb.net program but also be able to watch the progress?I am not reinventing the wheel I am simply making a small app for my customers computers (for free) that will automatically perform disk cleanup and defrag to a schedule not requiring the end user to do absolutly anything (+some other tasks and features)

I have my disk cleanup all working but for the Defrag I would just like to use the windows defrag for instance (defrag C however I have a small GUI with progressbar and % indicator is there anyway I can get progress to report back. I know Windows defrag is compeltly different in Windows 7 I am not sure if this is even possible?

View 13 Replies

VS 2010 : BackgroundWorker Does Not Report Progress

Sep 5, 2010

I have some issues with background worker progress reporting functionality. I'm implementing a progress indicator and even if I marked the backgroundworker as report progress (true), it won't report progress until it finish the job.

The code is like this:

Private Sub BackgroundWorker1_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork
action_1()

[code]....

The result is as expected (label1 with 100 value) but only when worker finished all the steps. If I'm triggering a messagebox in ProgressChange I see two message windows at the end of DoWork handle.

View 2 Replies

Attaching A Progressbar To Crystal Report Progress

Jun 3, 2010

how can i attach a progress bar to a crystal report progress control, my code extracts the data from the SQL Server database and displays it on a crystal report. all this process may take long time as the data size may be large or joins may take time, so how can i display this progress in a progress bar. How to attach hidden processes to the progressbar.

View 1 Replies

Add A Progress Bar In Code While Processing A Crystal Report Basic 2008?

Jun 22, 2010

I wish to add a progress bar in code. I have a sample here but with the "Cursor.Current = Cursors.WaitCursor" to notify the user that it running.. however a progress bar maybe can make it more noticeble. how can i do that.

Private
Sub CmdOK_Click(ByVal
sender As System.Object,

[code]....

View 2 Replies

Background Worker / Progress (Report To Default Instance Of Main Form)

May 23, 2012

I am using background worker to report progress on the screen. In the Main.vb I have the following

Public Sub report(ByVal sender As System.Object, ByVal e As System.ComponentModel.ProgressChangedEventArgs) Handles bwlistener.ProgressChanged
Dim message As String = e.UserState
logRTB.AppendText(message & vbCrLf)
End Sub

When I call this from Main.vb I use:
bwlistener.ReportProgress(0, "Some status text goes here")
It works great. The problem is when I try to call it from any other module in my project.

When I call it OtherFile.vb:
Main.bwlistener.ReportProgress(0, "Some status text goes here")
It doesn't work... The program doesn't crash. Debug goes through everything but no output is actually shown to the end user.

View 16 Replies

Forms :: How To Update Progress Bar Within Class

Aug 12, 2010

I am wondering how do I update a Progress Bar that resides in Form1 (for example) from a newly created class called from the Button in Form1. I have read several tutorial about backgroundworker. Most of the googled tutorials have their "long process code" in the do_work event. I have tried them and got it working from within the form itself.

However, there are 2 parts (long process) in which I wish to incorporate the updating of the progress bar; First one being a long sub routine that is in the main form (Form1). The second one is another long processing function that resides in a class. It is the second one that is giving the problem as I have no idea how to call the backgroundworker.reportProgress() to update the UI.

Here is the sample flowchart that I have created for the second long processing function:
I wish to insert a new instruction that says "Update the Progress bar that is in Form1" after the current instruction "Store the member into a collection".

View 4 Replies

VS 2008 - Background Class With Progress Bar

Nov 4, 2009

I have a function that requires 10-15 min to run. Due to sheer amount of time required to run this function, my form freezes and the user is left clue-less about what is happening to the program. I understand that this problem can be overcome using Background class and Progress bar.

View 8 Replies

Class Library - Progress Bar Doesn't Fill

Jun 21, 2010

Ok, I have a usercontrol in a Class Library Projects which contains a Button, 2 Listboxes, and a Progress bar. My code is to look for a file and if its there post to one listbox and fill in the progress bar and also put the programs current task in the other listbox. Recently, I started using VB.Net 2010 Express and wanted to turn part of a form into a .dll so it would be easier to update. I started getting a error and had to declare a variable as a New instance of UserControL1 (my user control). When I did this, the control would run, but the Progress Bar doesn't fill and neither of my listboxes show anything. What Should I do?

View 1 Replies

How To Report Result Back To Control Class Upon Completion

Aug 22, 2011

I need a few threads working simultaneously with URL requests in a VB.NET 2010 app. Once one of them finishes, it should continue with the next task in a list. I'm new to using threads. Since it seems like I can't declare an array of BackgroundWorker, I thought I'd have a control class that creates an instance of a task class for each task, which in turn starts a BackgroundWorker in its constructor.

However, with this approach I'm not sure how to report the result back to the control class upon completion. I had this vague idea that I could send a reference to an object in the control class (or to a public event I can trigger, is this possible?), but then I have to somehow store this address until the work is done. And I don't know how I can store the address from a ByRef for future use.

View 1 Replies

Reference A Report Variable In The Report Properties Code Window Of A Local Report?

Apr 19, 2011

how I can reference a report variable in the Report Properties Code Window of a local report? I have tried Variables!Claimant.Value (for a variable called Claimant) but I get an error "Reference to a non-shared member requires an object reference." I have tried qualifying it with Report. and also with the report name in front of it but I get errors with this also.I have the variable CLaimant defined in the Variables section of the Report Properties.

View 3 Replies

Using List Of Custom Class Object As Data Source For Crystal Report

May 24, 2011

I am trying to find way to design a report using my own custom class. I found links:

1.) How to work in Crystal Report with Object Data Source?

2.) Use .net object as data source in Crystal Report 2008

3.) Binding object with List<> to Crystal Report

4.) How to assign Custom class as datasource in crystal report

They were quite helpful, but I have been stuck in the first step while designing report as my custom class's property is not listed in field list of crystal report design view.[code]When I add my class objects to crystal report I do not get the usertype field from users class in field list.So how can I add usertype field to my field list? Or do I have to take another approach?The reason i wanted to use it as i am:

1.) Showing a form where user can type keyword
2.) program filters the records as per keyword using LINQ
3.) when user clicks the print button, I want to set the filtered records as datasource of my report

View 3 Replies

Creating A Simple Web Browser / Use Progress Bar To Display Load Progress?

Apr 20, 2007

im making a web browser which is intertwind in a project, but i cant get the progress bar to display the current percent of a page that is loaded, i want to have 10 segments, each standing for 10% of the total page loaded. So say a page is loaded 67%, 6 out of 10 of the segments will be shown.

View 3 Replies

File Sync Show Progress In Progress Bar Hangs?

Mar 19, 2010

I copied the code here and translate the code to vb [URL]it is working fine but there is one small problem but I cannot solve? Here is my code: SyncClientVB Another Source The scenario is... the progress is reported by an event (OnCopyingFile event)

Public Sub OnCopyingFile(ByVal sender As Object, ByVal e As CopyingFileEventArgs)
If pbFileTransfer.Value <> e.PercentCopied Then
If txtCurrentFile.Text <> e.FilePath Then
txtCurrentFile.Text = e.FilePath

[code]....

The problem is that it is ok when runned but when I click the form it starts to hang but in the console... it is still continuing.

dp.SyntaxHighlighter.ClipboardSwf = '/dp.SyntaxHighlighter/Scripts/clipboard.swf'
dp.SyntaxHighlighter.HighlightAll('6f5d1b01659646618ff3bdca29fb1b7f')

View 5 Replies

Get The Progress Bar Show The Progress Of The Batchfile Running In The Background??

Jul 7, 2010

get the progress bar show the progress of the batchfile running in the background?

View 10 Replies

Progress Bar - Show The Current Progress Of The Automated Tasks?

Mar 6, 2009

I have two forms, when the user selects a button, the second form opens and an external executable begins an automated process. The point of the second form, is to only show the current progress of the automated tasks and closes when those tasks are completed.How would I use a progress bar to show the current progress of an action on a different form without knowing how long it will take?

View 9 Replies

VS 2008 Progress Bar - Run FrmProcess - Shows Progress Of Their Selection

Jan 4, 2012

frmMain - Allows user to pick process or combination of processes they want to run frmProcess - Shows progress of their selection I have three modules. Each runs a specific process. The frmMain allows the user to run any one of the three modules individually or all together in a single process (basically, runs the one after the other until done).

[Code]...

View 3 Replies

VS 2010 - Upload A File And Have A Progress Bar Track The Progress?

Jan 17, 2012

Looked through many tuts, can't find one.

View 1 Replies

Add A Progress Bar To Follow The Progress Of The Files In The Queue?

Mar 28, 2011

I have a filesystemwatcher which place files in a queue when they are created. From the queue the files are further processed (xml into SQL database).

The mechanism works fine, but I want to add a progress bar to follow the progress of the files in the queue: processing 1 of 10......2 of 10......3 of 10 etc.For testing, I created a batch file to simulate the creation of files, so the filesystemwatcher can to his work and place the files in the queue. When I tell the batchfile to simulate the creation of 20 files, I see that the amount of files in the queue change. For example;

[code]...

View 8 Replies

Progress Bar To Show The Progress Of The Current Task?

Jun 11, 2010

In the app I'm currently making, I have two progress bars. One for current task being committed and the other is for overall progress.During runtime, I calculate how many tasks are being run and set that as the maximum. As each task completes, the progress bar is incremented by one.

I want the current task progress bar to show the progress of the current task. Some tasks can take a few minutes to complete so that progress bar works great. But, if the task is super quick, like editing registry keys, I see no progress at all.When I edit the registry, it basically goes like this:

'Edit Key
'x
'x
'x
ProgressBar1.PerformStep()[code].....

It completes so quickly that I never see the bar even move.I also have each task report its name into a label and it skips ahead so quickly that I only see the first task name and the last.Is there any way to make this do a better job at reporting the progress?

View 2 Replies

Progress Bars To Show Actual Progress?

Jul 22, 2011

I came across a problem in my program it takes too long to calculate the values needed (about 10 sec) .But thats not the problem you don't know when the program is working or not, as it just locks up until its finshed and I view that as a problem.

I need to be able to show the progress of this .I looked at using background Workers but I get exception "Object reference not set to an instance" I believe this is because the background worker cannot write values or something ,As it works will a normal handler.

[code]...

View 3 Replies

VS 2008 Button Starts Progress Bar And Then Once The Progress Bar Is Full It Enables Button?

Aug 21, 2011

SOrry for long title i've forgotten how to do this so please may i have a code im new to VB 2008

View 3 Replies

Close The Crystal Report Viewer And Pass The Parameter Again And Should Be Able To View Report Again?

Aug 15, 2011

When i pass the parameter and run the report it works fine as i close the form it closes the form is there any way so that i should be able to close the crystal report viewer and pass the parameter again and should be able to view report again.

View 1 Replies

Print A Report Which Is Receipt Having Size 3 X 4 Cm But Unable To Resize Crystal Report?

Dec 30, 2010

I got a problem I want to print a report which is receipt having size 3 x 4 cm. i am unable to resize crystal report. i am using crystal report coming with visual studio.net 2008.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved