Updating Statusbar panels from another form?

  • Thread starter Thread starter TonyM
  • Start date Start date
T

TonyM

Hi all,

I have an application with a few different Windows forms. I am trying to
update a statusbar panel's text that is in the main form, from another form.

When I set the statusbar and the statusbar panels to public and shared in
VS.net's property box it will work. However, whenever I make any
modifications to the main form it will remove the shared property and I will
get build errors about accessing the panels with "this.".

Is there a better way to make the text of the statusbar panels accessible
from other classes/forms?

Thank you for any help, I've about googled my eyes out looking for the
answer to this!
 
Thanks for the quick Reply Bob, I have tried to add a property to set the
private statusbar field. However, when I add the "static" modifier to the
property, I can no longer see the private statusbar field within the
property.

Thanks again for any insight.
 
Obviously not because the status bar field is an instance field.

Why do you think you need a static modifier?

--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
 
Back
Top