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"
Form2.Show()
Call Main()
Form2.Label1.Text = "SComplete"
]

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"
FormToUpdate.Label2.Refresh

Hope this helps

Worked Great, Thanks.

Be a part of the DaniWeb community

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