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

C#實(shí)現(xiàn)網(wǎng)絡(luò)點(diǎn)對(duì)點(diǎn)具體步驟

開(kāi)發(fā) 后端
這里介紹C#實(shí)現(xiàn)網(wǎng)絡(luò)點(diǎn)對(duì)點(diǎn)具體步驟,在(解決方案資源管理器)窗口中,雙擊Form1.cs文件,進(jìn)入Form1.cs文件的編輯界面。以下面代碼替代系統(tǒng)產(chǎn)生的InitializeComponent過(guò)程。

C#有很多值得學(xué)習(xí)的地方,這里我們主要介紹C#實(shí)現(xiàn)網(wǎng)絡(luò)點(diǎn)對(duì)點(diǎn)具體步驟,包括介紹Visual Studio .Net集成開(kāi)發(fā)環(huán)境等方面。

C#實(shí)現(xiàn)網(wǎng)絡(luò)點(diǎn)對(duì)點(diǎn)具體步驟:

在了解、掌握了關(guān)鍵問(wèn)題及其解決方法,再實(shí)現(xiàn)用Visual C#實(shí)現(xiàn)網(wǎng)絡(luò)點(diǎn)對(duì)點(diǎn)通訊程序相對(duì)就容易許多,下面是具體的實(shí)現(xiàn)步驟:

1.啟動(dòng)Visual Studio .Net,并新建一個(gè)Visual C#項(xiàng)目,名稱為(Visual C#實(shí)現(xiàn)網(wǎng)絡(luò)點(diǎn)對(duì)點(diǎn)通訊程序)。

2.在Visual Studio .Net集成開(kāi)發(fā)環(huán)境中的(解決方案資源管理器)窗口中,雙擊Form1.cs文件,進(jìn)入Form1.cs文件的編輯界面。

3.在Form1.cs文件的開(kāi)頭,用下列導(dǎo)入命名空間代碼替代系統(tǒng)缺省的導(dǎo)入命名空間代碼。

  1. using System ;  
  2. using System.Drawing ;  
  3. using System.Collections ;  
  4. using System.ComponentModel ;  
  5. using System.Windows.Forms ;  
  6. using System.Data ;  
  7. using System.Net.Sockets ;  
  8. using System.Net ;  
  9. using System.IO ;  
  10. using System.Text ;  
  11. using System.Threading ; 

4.再把Visual Studio.Net的當(dāng)前窗口切換到(Form1.cs(設(shè)計(jì)))窗口,并從(工具箱)中的(Windows窗體組件)選項(xiàng)卡中往窗體中拖入下列組件:

四個(gè)Button組件;二個(gè)ListBox組件;四個(gè)TextBox組件;一個(gè)StatusBar組件;五個(gè)Label組件。并在四個(gè)Button組件拖入窗體后,分別在窗體設(shè)計(jì)界面中雙擊它們,則系統(tǒng)會(huì)在Form1.cs文件中分別產(chǎn)生這四個(gè)組件的Click事件對(duì)應(yīng)的處理代碼。

5.在(解決方案資源管理器)窗口中,雙擊Form1.cs文件,進(jìn)入Form1.cs文件的編輯界面。以下面代碼替代系統(tǒng)產(chǎn)生的InitializeComponent過(guò)程。下面代碼是對(duì)上面添加的組件進(jìn)行初始化:

  1. private void InitializeComponent ( )  
  2. {  
  3. this.listBox1 = new System.Windows.Forms.ListBox ( ) ;  
  4. this.textBox1 = new System.Windows.Forms.TextBox ( ) ;  
  5. this.label3 = new System.Windows.Forms.Label ( ) ;  
  6. this.label2 = new System.Windows.Forms.Label ( ) ;  
  7. this.textBox3 = new System.Windows.Forms.TextBox ( ) ;  
  8. this.button1 = new System.Windows.Forms.Button ( ) ;  
  9. this.textBox2 = new System.Windows.Forms.TextBox ( ) ;  
  10. this.label1 = new System.Windows.Forms.Label ( ) ;  
  11. this.label4 = new System.Windows.Forms.Label ( ) ;  
  12. this.label5 = new System.Windows.Forms.Label ( ) ;  
  13. this.button2 = new System.Windows.Forms.Button ( ) ;  
  14. this.button3 = new System.Windows.Forms.Button ( ) ;  
  15. this.button4 = new System.Windows.Forms.Button ( ) ;  
  16. this.textBox4 = new System.Windows.Forms.TextBox ( ) ;  
  17. this.statusBar1 = new System.Windows.Forms.StatusBar ( ) ;  
  18. this.statusBarPanel1 = new System.Windows.Forms.StatusBarPanel( );  
  19. this.statusBarPanel2 = new System.Windows.Forms.StatusBarPanel( );  
  20. this.label6 = new System.Windows.Forms.Label ( ) ;  
  21. this.listBox2 = new System.Windows.Forms.ListBox ( ) ;  
  22. ( ( System.ComponentModel.ISupportInitialize )  
  23. ( this.statusBarPanel1 ) ).BeginInit ( ) ;  
  24. ( ( System.ComponentModel.ISupportInitialize )  
  25. ( this.statusBarPanel2 ) ).BeginInit ( ) ;  
  26. this.SuspendLayout ( ) ;  
  27. this.listBox1.ItemHeight = 12 ;  
  28. this.listBox1.Location = new System.Drawing.Point ( 122 , 110 ) ;  
  29. this.listBox1.Name = "listBox1" ;  
  30. this.listBox1.Size = new System.Drawing.Size ( 212 , 88 ) ;  
  31. this.listBox1.TabIndex = 4 ;  
  32. this.textBox1.Location = new System.Drawing.Point ( 122 , 18 ) ;  
  33. this.textBox1.Name = "textBox1" ;  
  34. this.textBox1.Size = new System.Drawing.Size ( 210 , 21 ) ;  
  35. this.textBox1.TabIndex = 1 ;  
  36. this.textBox1.Text = "" ;  
  37. this.label3.Location = new System.Drawing.Point ( 220 , 52 ) ;  
  38. this.label3.Na  

【編輯推薦】

  1. C#創(chuàng)建表單簡(jiǎn)單介紹
  2. C#修改DataReader默認(rèn)行為
  3. C#設(shè)置CooperativeLevel概述
  4. C#表單增加控件簡(jiǎn)單描述
  5. C# EmployeePlug類概述
責(zé)任編輯:佚名 來(lái)源: 博客園
相關(guān)推薦

2010-06-21 17:05:00

Linux Arch

2010-01-12 11:55:10

VB.NET網(wǎng)絡(luò)監(jiān)控

2010-06-22 14:55:21

autoconf安裝

2009-12-07 10:46:08

WCF框架

2010-07-28 16:33:43

Fedora 10ADSL網(wǎng)絡(luò)連接

2010-04-02 11:41:51

單機(jī)無(wú)線上網(wǎng)

2010-05-10 17:34:17

Oracle 客戶端配

2010-05-10 18:15:16

Oracle跨服務(wù)器

2010-07-02 09:48:58

2003 SNMP啟用

2010-02-22 10:52:34

PDA訪問(wèn)WCF

2009-01-30 21:56:00

2010-08-02 17:08:34

Flex Eclips

2010-10-08 11:29:24

JavaScript對(duì)象

2010-09-25 16:30:25

DHCP選項(xiàng)設(shè)置

2010-04-02 11:53:11

雙機(jī)共享無(wú)線上網(wǎng)

2009-09-03 13:54:12

C#實(shí)現(xiàn)局域網(wǎng)點(diǎn)對(duì)點(diǎn)

2010-06-22 16:05:40

Autoconf rp

2010-09-26 10:38:37

JVM安裝Tomcat

2010-08-09 14:32:38

2010-07-21 17:19:16

點(diǎn)贊
收藏

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