日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時(shí)間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
C#實(shí)現(xiàn)網(wǎng)絡(luò)點(diǎn)對點(diǎn)具體步驟

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

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

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

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

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

3.在Form1.cs文件的開頭,用下列導(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)會在Form1.cs文件中分別產(chǎn)生這四個(gè)組件的Click事件對應(yīng)的處理代碼。

5.在(解決方案資源管理器)窗口中,雙擊Form1.cs文件,進(jìn)入Form1.cs文件的編輯界面。以下面代碼替代系統(tǒng)產(chǎn)生的InitializeComponent過程。下面代碼是對上面添加的組件進(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 

當(dāng)前名稱:C#實(shí)現(xiàn)網(wǎng)絡(luò)點(diǎn)對點(diǎn)具體步驟
網(wǎng)站路徑:http://www.5511xx.com/article/djigghj.html