index > Visual C# General > Updating text in a ToolStripStatusLabel.

Updating text in a ToolStripStatusLabel.

Hello, I have a bit of a situation here. I want to update the text in a toolstrip label from a different thread that it was created from. I've tried using Invoke but I get a compile error:

Error 1 'System.Windows.Forms.ToolStripStatusLabel' does not contain a definition for 'Invoke'

Obviously this means toolstrip labels can't use invoke.. So I was wondering what other way I could update text from a different thread.
VoiDeD
You should be able to set the Text property on that instance of your ToolStripStatusLabel even though it was created on a different different thread.  Get a handle on that instance and then assign the Text property to what you're looking for.  For instance, if you ToolStringStatusLabel was called "tool," you could use the code below.

tool.Text = "Specify Text";

HTH,
Karen
Visual C#




Program Manager, Visual C#
Karen Liu MSFT
reply 2

You can use google to search for other answers

 

More Articles

• thanks of answer
• reading data from disks in c#
• a value simplified? etc. 27 > 30, 54 > 60
• PingReply Problem
• IDispose in detail
• Disposing object
• Getting Started .... rendundant build errors.
• How to Add a Windows Service in VC#2005 Express Edition
• Newbie and no understanding how to use SQL Server Express
• Media Playlist -->
Bookmark and Share
Welcome to Bokebb   New Update  
 

New Articles

• How to set form icon; it doesn't work fo
• MathServiceItem_cs.wsdl not found
• How do I create a simple table in C#
• How can I change the volume using C#?
• Passing a reference to a value type from
• How to write section handler into app.co
• Creating a splash screen
• How To Create a Delagate in a TypeConver
• Sealed Classes - To use it or not
• MS, MVP feedback, question: casts / conv
• please help me in convert a C++ code int
• Timer_Tick Event
• Append new column into a existing Access
• how to add custom control to datagrid cell
• read probing path from dll.config file

Hot Articles

• Need a quick conversion from string to c
• how do i convert days into months
• Window Service printing HTML
• Writing a Graphic to file
• Getting the user's location (country) in
• Problem REFRESHING UserPaint-ed controls.
• HighestBitSet in C#
• why is this error?
• c# 2005 flash8 actionscript 2.0
• Deleting DirectoryEntry Objects.
• Writability of TEMP
• How To Create a Delagate in a TypeConver
• Adding markers to .wma file in c#?
• Windows Service
• Want to run the job at 12am (Mid Night)

Recommend Articles

• DataBase - Duplicate Records
• Hide '+' sign in DataGrid 2.0
• How do I execute a vbscript from a c# wi
• Serial port time out question
• Access objects in CreateUserWizard Custo
• Please help InitializeLifetimeService
• Attribute refuses cast
• C# Hashtable Issue
• Resize Window and move controls
• Displaying Print Dialog box when printing
• Display one form from another? (wks whe
• HOW PROGRAM CAN DETECT UPDATE DLL FILES
• GetMethod and ReflectionPermission
• Show Method
• how to make a toolbar button that i can