Can code from a class return text to a calling forms richtextbox

P

Phillip

I have a form that has a list box of simple processes that don't need a
visual form. The for would only have a button that said start on it if
it did.

So when I call this class and run the process For example download a
daily file from an FTP site. I want the class to update a richtextbox
on the calling form with its progess for each step.

I can't use "Dim withevents." Case 1 is my problem.

Select Case TasksListBox.SelectedValue
Case 1 '\\\ANS Process
Dim WithEvents MyANS As New CBI.EDITASK2.ANS.Processes.ANSSendAll
MyANS.SENDALLPRocess(rtbxStatus)
Case 3
Dim WebMDInstClaims As New WebMDInstClaimsProcess
WebMDInstClaims.Show()
End Select

I tired passing the txtbox to the class but it won't show the text
while the process is running.
 
P

Phill. W

Phillip said:
I tried passing the txtbox to the class but it won't show the text
while the process is running.

You're on the right lines here, but you need to let Windows get a look in
so that it can display the new text in the TextBox. I'd use the Refresh()
method on the TextBox but there are other [and, possibly, better] ways ...

HTH,
Phill W.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top