By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,333 Members | 1,070 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,333 IT Pros & Developers. It's quick & easy.

How to pass a form control to a class for updating

P: n/a
Ok, here's the scenario:

I have a form with a status bar on it.
I have a class that does a LOT of processing.
I want to update the status bar text property periodically from within the
class by passing a reference of the status bar to the class.

In VB6 this is pretty straightforward, but I just can't seem to get it
figured out in vb.net.
Should I be trying to do it this way in .net or what?

Can anyone help me?
Apr 4 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
timc_fla wrote:
Ok, here's the scenario:

I have a form with a status bar on it.
I have a class that does a LOT of processing.
I want to update the status bar text property periodically from within the
class by passing a reference of the status bar to the class.

In VB6 this is pretty straightforward, but I just can't seem to get it
figured out in vb.net.
Should I be trying to do it this way in .net or what?

Can anyone help me?


If you want to have the UI update while doing a cpu intensive job you
should launch the job in a worker thread. You can then use a delegate
to update your status bar.

http://abstractvb.com/code.asp?A=1027

Chris
Apr 4 '06 #2

P: n/a
Chris wrote:
Ok, here's the scenario:

[quoted text clipped - 8 lines]

Can anyone help me?


If you want to have the UI update while doing a cpu intensive job you
should launch the job in a worker thread. You can then use a delegate
to update your status bar.

http://abstractvb.com/code.asp?A=1027

Chris


Cool!
It's not really a CPU intesive job but SQL intensive.
Get records, processing them and outputting a text file, bascially.
I want to provide some sort of feedback so the user knows the app is working.
So, if I understand the example correctly, it appears that class Counter will
be my class and everything else should fall into place with a few simple
changes?
Apr 4 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.