Occurs when a visual aspect of an owner-drawn status bar control changes.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
You can use this event to perform drawing operations in an owner-drawn StatusBar control. For example, if you display an owner-drawn StatusBarPanel that displays a progress bar, you can use this event to perform the drawing of the progress bar on the panel. The data provided to the event through the StatusBarDrawItemEventArgs object passed as a parameter to the event handler enables you to determine the panel that needs to be drawn and the Graphics to use to draw to the panel. This event is only raised when the StatusBarPanel.Style property of a StatusBarPanel in a StatusBar control is set to OwnerDraw.
For more information about handling events, see Consuming Events.
The following code example demonstrates how to create an owner-drawn StatusBarPanel that displays a custom background and the current date. This example requires that you have connected the event of a StatusBar control to the event handler defined in the example.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.