日期:2014-05-18  浏览次数:20836 次

C# 聊天室的框架设计实现源码

C#代码????

?????要想QQ一样有聊天室,C#里是个可是编程的软件,呵呵,textlabel可以拖就可以了,呵呵。和容易。可是怎样显示字符和怎样获得字符是个事情。嗯,我花了差不多一个是完成了,可是完成之后,好简单的,嗯。与java的差不多,代码如下:?

??C#代码??

namespace TcpIp通信   
{   
    partial class Form1   
    {   
        /// <summary>   
        /// 必需的设计器变量。   
        /// </summary>   
        private System.ComponentModel.IContainer components = null;   
  
        /// <summary>   
        /// 清理所有正在使用的资源。   
        /// </summary>   
        /// <param name="disposing">如果应释放托管资源,为 true;否则为    
  
false。</param>   
        protected override void Dispose(bool disposing)   
        {   
            if (disposing && (components != null))   
            {   
                components.Dispose();   
            }   
            base.Dispose(disposing);   
        }  
 
        #region Windows 窗体设计器生成的代码   
  
        /// <summary>   
        /// 设计器支持所需的方法 - 不要   
        /// 使用代码编辑器修改此方法的内容。   
        /// </summary>   
        private void InitializeComponent()   
        {   
              
            this.richTextBox2 = new System.Windows.Forms.RichTextBox();   
            this.button1 = new System.Windows.Forms.Button();   
            this.label1 = new System.Windows.Forms.Label();   
            this.label3 = new System.Windows.Forms.Label();   
            this.SuspendLayout();   
            this.richTextBox1 = new System.Windows.Forms.RichTextBox();   
  
            //    
            // richTextBox1   
            //    
              
            this.richTextBox1.Location = new System.Drawing.Point(26,    
  
28);   
            this.richTextBox1.Name = "richTextBox1";   
            this.richTextBox1.Size = new System.Drawing.Size(395, 241);   
            this.richTextBox1.TabIndex = 7;   
            this.richTextBox1.Text = "";     
            //    
            // richTextBox2   
            //    
            this.richTextBox2.Location = new System.Drawing.Point(40,    
  
299);   
            this.richTextBox2.Name = "richTextBox2";   
            this.richTextBox2.Size = new System.Drawing.Size(381, 133);   
            this.richTextBox2.TabIndex = 2;   
            this.richTextBox2.Text = "";   
            this.richTextBox2.TextChanged += new System.EventHandler   
  
(this.seMsg);   
            //    
            // button1   
            //    
            this.button1.Location = new System.Drawing.Point(346, 438);   
            this.button1.Name = "button1";   
            this.button1.Size = new System.Drawing.Size(75, 23);   
            this.button1.TabIndex = 3;   
            this.button1.Text = "send";   
            this.button1.UseVisualStyleBackColor = true;   
            this.button1.Click += new System.EventHandler   
  
(this.button1_Click);   
            //    
            // label1   
            //    
            this.label1.AutoSize = true;   
            this.label1.Location = new System.Drawing.Point(183, 281);   
            this.label1.Name = "label1";   
            this.label1.Size = new System.Drawing.Size(53, 12);   
            this.label1.TabIndex = 5;   
            this.label1.Text = "发送信息";   
            //    
            // label3