<!-- Download Links -->
Some of the features of MFC that we were accustomed to having are
missing from the .NET architecture. One of them is
the automatic use of the status bar. As the user moves across the
menu, a description will appear in the status bar.
The .NET architecture allows you to repeat this functionality by overriding the
class. Unfortunately, it's a manual process and requires a large
Hopefully, we can overcome this shortcoming with a quick and simple extended
property. Plus, give you a sample to create your own extended interfaces.
IExtenderProvider is a tremendously powerful tool when used in conjunction
with the interface. The syntax is quite simple.
[ProvideProperty( "StatusMessage", typeof(Component)) ]
public class StatusMessage : Component, IExtenderProvider
public void SetStatusMessage( Component pComponent, string strMessage )
public string GetStatusMessage( Component pComponent )
ProvideProperty tag tells the interface that you are adding a property
StatusMessage" to all components in your current
development. Similar to a C# property, you will create a Set and
Get pair of messages.
The source code for the interface is quite simple, but I'll refrain from
discussing the actual coding process to keep this article on a basic level.
1. Add the StatusMessage control to .NET
After copying the Extended Interface DLL (ExtendedInterface.DLL) to
your desired destination, you will need to add it permanently to your
With the toolbox open, right click the list to select 'Customize Toolbox.
Select the tab .NET Framework Components
Click on ExtendedInterface.DLL
The Toolbox should have two new components: StatusMessage and ToolBarFunction.
StatusMessage support is as easy as dragging the
onto your form. The component will appear below your form.
The other component ToolBarFunction will be discussed in a later
2. Add the component to your current project.
You will also need to drag over a
StatusBar from your Toolbox onto your
form. Make sure to add at least one
StatusBarPanel to your
Display the properties of your
Click on the 'Panels' collection and add at least one panel. Call it
anything you wish, I used
AutoSize is set to
Click OK to close the collection.
3. Change the StatusMessage property
You will need to modify your
StatusMessage component to point to the
that you have created.
Display the properties of your StatusMessage.
Click on the
StatusBar property and use the combo dropdown to find the
StatusBarPanel that you are wanting to use.
4. Add messages to your menus
Now click on each of your items in your menu. Under the Misc category
you will now have a new property called StatusMessage.
Type in the text that you would like to appear in the status bar for each
5. Test your application
And voila!! Your .NET application now has support for your status bar!