自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

C#Windows應(yīng)用程序開發(fā)之添加狀態(tài)條

開發(fā) 后端
C#Windows應(yīng)用程序開發(fā)之添加狀態(tài)條實(shí)現(xiàn)的過程是什么呢?C#Windows應(yīng)用程序開發(fā)之添加狀態(tài)條的具體操作又是如何的呢?那么本文就向你一一講解。

C#Windows應(yīng)用程序開發(fā)之添加狀態(tài)條前言:通常windows應(yīng)用程序都有相似的特征:控件、菜單、工具條、狀態(tài)欄等等。每次我們開始作一個(gè)新的windows應(yīng)用程序時(shí)都是以相同的事情開始:建立項(xiàng)目,添加控件和事件處理器。如果我們有一個(gè)模板,那么我們就可以節(jié)約大量的時(shí)間了。

在介紹如何建立模板的過程中,將涉及大量的微軟.net framework類庫的基本知識(shí)。如果你沒有使用集成開發(fā)環(huán)境那么本文介紹的模板對(duì)你將非常有用,如果你使用了visual studio.net這樣的集成開發(fā)環(huán)境你也可以從中了解控件的工作方式,這對(duì)你也是很有用的。

C#Windows應(yīng)用程序開發(fā)之添加狀態(tài)條的過程:

C#Windows應(yīng)用程序開發(fā)之添加狀態(tài)條由System.Windows.Forms.StatusBar描述,它提供了定制控件的外觀的屬性,狀態(tài)條由StatusBarPanel對(duì)象組成,在我們的模板中狀態(tài)條有兩個(gè)嵌套板:

  1. StatusBar statusBar = new StatusBar();   
  2. StatusBarPanel statusBarPanel1 = new StatusBarPanel();   
  3. StatusBarPanel statusBarPanel2 = new StatusBarPanel();  

C#Windows應(yīng)用程序開發(fā)之添加狀態(tài)條之狀態(tài)條和狀態(tài)跳上的嵌套板由下面的代碼設(shè)置:

  1. statusBarPanel1.BorderStyle = StatusBarPanelBorderStyle.Sunken;   
  2. statusBarPanel1.Text = "Press F1 for Help";   
  3. statusBarPanel1.AutoSize = StatusBarPanelAutoSize.Spring;   
  4. statusBarPanel2.BorderStyle = StatusBarPanelBorderStyle.Raised;   
  5. statusBarPanel2.ToolTipText = System.DateTime.Now.ToShortTimeString();   
  6. statusBarPanel2.Text = System.DateTime.Today.ToLongDateString();   
  7. statusBarPanel2.AutoSize = StatusBarPanelAutoSize.Contents;   
  8. statusBar.ShowPanels = true;   
  9. statusBar.Panels.Add(statusBarPanel1);   
  10. statusBar.Panels.Add(statusBarPanel2);   

C#Windows應(yīng)用程序開發(fā)之添加狀態(tài)條目的:我們需要將狀態(tài)條添加到窗體中:

  1. this.Controls.Add(statusBar);   

C#Windows應(yīng)用程序開發(fā)之添加狀態(tài)條的基本情況就向你介紹到這里,希望對(duì)你學(xué)習(xí)和了解C#Windows應(yīng)用程序開發(fā)之添加狀態(tài)條有所幫助。

【編輯推薦】

  1. C#Windows服務(wù)程序之安裝項(xiàng)目
  2. C#實(shí)現(xiàn)Windows后臺(tái)服務(wù)實(shí)例淺析
  3. C#Windows應(yīng)用程序開發(fā)之創(chuàng)建窗體
  4. C#Windows應(yīng)用程序開發(fā)之窗體控件
  5. C#Windows應(yīng)用程序開發(fā)之添加菜單
責(zé)任編輯:仲衡 來源: builder.com.cn
相關(guān)推薦

2009-08-14 17:43:20

C#Windows應(yīng)用

2009-08-14 17:27:30

C#Windows應(yīng)用

2009-08-14 17:51:32

C#Windows應(yīng)用

2009-08-14 17:36:20

C#Windows應(yīng)用

2009-08-14 18:04:59

C#Windows應(yīng)用

2009-08-14 18:00:22

C#Windows應(yīng)用

2009-08-14 13:41:13

C#Windows服務(wù)

2009-08-14 15:19:38

Windows服務(wù)程序Windows服務(wù)

2009-08-14 14:25:09

Windows服務(wù)程序

2009-08-14 11:15:19

文件監(jiān)視C#Windows服務(wù)

2009-08-14 15:54:50

Windows服務(wù)程序C#Windows服務(wù)

2009-08-14 16:48:39

C#Windows服務(wù)

2009-08-14 14:45:03

C#Windows服務(wù)

2009-08-14 14:17:16

C#Windows服務(wù)

2009-08-14 16:24:00

Windows服務(wù)程序

2009-08-14 16:13:25

C#windows服務(wù)

2009-08-14 15:06:08

Windows服務(wù)程序

2009-08-14 15:47:18

C#Windows服務(wù)

2009-08-24 14:19:27

C# Windows應(yīng)

2009-04-12 09:25:12

Symbian諾基亞移動(dòng)OS
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)