I have created a porcess that manipulates large volumes of text. I have created a form that has a button that manually starts the process. I have tried to give some feedback that the process is actually progressing through the data by changing the value of text fields on the form. However the text fields do not update on the form until after the process is complete. I had this working in another program but cannot figure out what I am doing different. I use the following code to change the text.

[ Form2.Label2.Text = "Started"
Call Main()
Form2.Label1.Text = "SComplete"

Re: form update while process is running 80 80

For the example I'll assume that Form2 is created using
Dim Form2 as New frmMyForm
being frmMyForm the class for the form being used

Then I will suggest to change the definition of sub Main as:

Sub Main(ByRef FormToUpdate as frmMyFomr)

Then inside the sub Main you can

FormToUpdate.Label2.Text = "I've prcessed a bit"

Hope this helps

Re: form update while process is running 80 80

Worked Great, Thanks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.