PC Review


Reply
Thread Tools Rate Thread

Access Form's Statusbar Panel From Library File

 
 
joey.powell@topscene.com
Guest
Posts: n/a
 
      5th Apr 2006
I have a windows forms app with a statusbar. In the form's code, I use
a delegates and spawn a worker thread to get processing off of the GUI
thread. Then in the worker thread I access a function in a library
file. The function needs to be able to update some of the forms status
bar panels. I have had great success in doing the following...

Invoke(new UpdateStatusDelegate(this.UpdateStatus), new object[] { "My
Message" });

BUT, it doesn't work from the function in the library file. I have
gotten it down to two error messages on compile:

1. The name 'Invoke' does not exist in the current context
2. An object reference is required for the nonstatic field, method, or
property 'MyNamespace._MyFormInstance.UpdateStatus(string)'

First, I do not understand why the first error message is occurring. I
have all "using" statements in the library file set to the same as in
the form's code file. I am missing something, somewhere.

Second, I can see why the second message is occurring. The calling form
instance is non-static. But this doesn't cause any problem when using
the code snippet in the form's code file.

Any suggestions?

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how can remove panel in statusbar? jonathan Microsoft Dot NET Framework Forms 3 8th Jun 2005 05:19 PM
Statusbar, a doubleClick , how to get the panel ? Peter Stojkovic Microsoft Dot NET Framework Forms 1 12th May 2005 08:31 PM
StatusBar panel collection =?Utf-8?B?Sm9iIExvdA==?= Microsoft Dot NET 0 4th Mar 2005 06:13 AM
Put a picture in a StatusBar Panel Geoff Microsoft VB .NET 7 28th Nov 2003 06:15 AM
icon in statusbar panel EricJ Microsoft VB .NET 3 15th Oct 2003 10:52 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:33 PM.