ToolStripRenderer.RenderStatusStripSizingGrip 事件

定义

当显示样式更改时发生。

public:
 event System::Windows::Forms::ToolStripRenderEventHandler ^ RenderStatusStripSizingGrip;
public event System.Windows.Forms.ToolStripRenderEventHandler RenderStatusStripSizingGrip;
member this.RenderStatusStripSizingGrip : System.Windows.Forms.ToolStripRenderEventHandler 
Public Custom Event RenderStatusStripSizingGrip As ToolStripRenderEventHandler 

事件类型

示例

下面的代码示例演示了此成员的用法。 在此示例中,事件处理程序报告事件的发生情况 RenderStatusStripSizingGrip 。 此报告可帮助你了解事件发生的时间,并可以帮助你进行调试。

若要运行示例代码,请将其粘贴到包含继承自 ToolStripRenderer的类型的实例(如 ToolStripSystemRendererToolStripProfessionalRenderer)的项目中。 然后命名实例 ToolStripRenderer1 并确保事件处理程序与事件 RenderStatusStripSizingGrip 相关联。

private void ToolStripRenderer1_RenderStatusStripSizingGrip(Object sender, ToolStripRenderEventArgs e) {

System.Text.StringBuilder messageBoxCS = new System.Text.StringBuilder();
messageBoxCS.AppendFormat("{0} = {1}", "AffectedBounds", e.AffectedBounds );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "BackColor", e.BackColor );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "Graphics", e.Graphics );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "ToolStrip", e.ToolStrip );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "ConnectedArea", e.ConnectedArea );
messageBoxCS.AppendLine();
MessageBox.Show(messageBoxCS.ToString(), "RenderStatusStripSizingGrip Event" );
}
Private Sub ToolStripRenderer1_RenderStatusStripSizingGrip(sender as Object, e as ToolStripRenderEventArgs) _ 
     Handles ToolStripRenderer1.RenderStatusStripSizingGrip

    Dim messageBoxVB as New System.Text.StringBuilder()
    messageBoxVB.AppendFormat("{0} = {1}", "AffectedBounds", e.AffectedBounds)
    messageBoxVB.AppendLine()
    messageBoxVB.AppendFormat("{0} = {1}", "BackColor", e.BackColor)
    messageBoxVB.AppendLine()
    messageBoxVB.AppendFormat("{0} = {1}", "Graphics", e.Graphics)
    messageBoxVB.AppendLine()
    messageBoxVB.AppendFormat("{0} = {1}", "ToolStrip", e.ToolStrip)
    messageBoxVB.AppendLine()
    messageBoxVB.AppendFormat("{0} = {1}", "ConnectedArea", e.ConnectedArea)
    messageBoxVB.AppendLine()
    MessageBox.Show(messageBoxVB.ToString(),"RenderStatusStripSizingGrip Event")

End Sub

注解

有关处理事件的详细信息,请参阅 处理和引发事件

适用于