private void CreateMyStatusBar()
{
    // Create a StatusBar control.
    StatusBar statusBar1 = new StatusBar();
    // Create two StatusBarPanel objects to display in the StatusBar.
    StatusBarPanel panel1 = new StatusBarPanel();
    StatusBarPanel panel2 = new StatusBarPanel();    // Display the first panel with a sunken border style.
    panel1.BorderStyle = StatusBarPanelBorderStyle.Sunken;
    // Initialize the text of the panel.
    panel1.Text = "Ready...";
    // Set the AutoSize property to use all remaining space on the StatusBar.
    panel1.AutoSize = StatusBarPanelAutoSize.Spring;
    // Display the second panel with a raised border style.
    panel2.BorderStyle = StatusBarPanelBorderStyle.Raised;
    // Create ToolTip text that displays the current time.
    panel2.ToolTipText = System.DateTime.Now.ToShortTimeString();
    // Set the text of the panel to the current date.
    panel2.Text = System.DateTime.Today.ToLongDateString();
    // Set the AutoSize property to size the panel to the size of the contents.
    panel2.AutoSize = StatusBarPanelAutoSize.Contents;
                
    // Display panels in the StatusBar control.
    statusBar1.ShowPanels = true;    // Add both panels to the StatusBarPanelCollection of the StatusBar.            
    statusBar1.Panels.Add(panel1);
    statusBar1.Panels.Add(panel2);    // Add the StatusBar to the form.
    this.Controls.Add(statusBar1);
}

解决方案 »

  1.   

    在页面中定义个就javasrcipt,中间定义个变量,然后再cs文件中传过去。
    或者就在page_load里面Response.个javasrcipt
      

  2.   

    SORRY
    说错了。不是创建statusbar.是用颜色填充状态栏
    真不好意思
      

  3.   

    能用颜色填充状态栏?没有试过,呵呵,可不可以将状态栏的panel的text属性为一个黑色块,然后设置字体的颜色为你的颜色,text直道填满状态为止,呵呵,只是想想,继续学习好方法
      

  4.   

    SORRY
    说错了。不是创建statusbar.是用颜色填充状态栏
    真不好意思
    ————————————————————
    差点大脑就彻底DEADLOCK了。
    look, maybe help
    http://support.microsoft.com/default.aspx?scid=kb;EN-US;319311
      

  5.   

    创建一个状态栏,且有一项panelStatus 
    StatusBar.Panels.Clear();
    panelStatus = new StatusBarPanel();
    panelStatus.BorderStyle = StatusBarPanelBorderStyle.Sunken;
    panelStatus.AutoSize = StatusBarPanelAutoSize.Spring;
    StatusBar.ShowPanels = true;
    StatusBar.Panels.Add(panelStatus);
    this.Controls.Add(StatusBar);在你想改变显示的地方用:
    panelStatus.Text = "系统正在运行中";
      

  6.   

    创建一个状态栏,且有一项panelStatus 
    StatusBarPanel panelStatus;
    System.Windows.Forms.StatusBar StatusBar;StatusBar.Panels.Clear();
    panelStatus = new StatusBarPanel();
    panelStatus.BorderStyle = StatusBarPanelBorderStyle.Sunken;
    panelStatus.AutoSize = StatusBarPanelAutoSize.Spring;
    StatusBar.ShowPanels = true;
    StatusBar.Panels.Add(panelStatus);
    this.Controls.Add(StatusBar);在你想改变显示的地方用:
    panelStatus.Text = "系统正在运行中";同理可创建多个项。
      

  7.   

    在页面中定义个就javasrcipt,中间定义个变量,然后再cs文件中传过去。
    或者就在page_load里面Response.个javasrcipt