• 大小: 0.05M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2020-12-14
  • 语言: C#
  • 标签:

资源简介

(sendmessage)利用委托制作两个窗体发送消息

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace sendmessage
{
    public partial class clients : Form
    {
        public clients()
        {
            InitializeComponent();
        }
        //实例化一个委托
        public sendmessage.serversend sd;
        private void button1_Click(object sender EventArgs e)
        {
            //调用委托
            sd(textBox1.Text);
            this.textBox1.Text = ““;
        }
        string servermsg;
        public void Receivce(string msg)
        {
            servermsg = servermsg + “\n 服务器:“ + msg;
            this.label1.Text = servermsg;
           
        }
    }


 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-03-25 11:25  sendmessage\
     目录           0  2018-03-24 22:24  sendmessage\bin\
     目录           0  2018-03-25 08:11  sendmessage\bin\Debug\
     文件       10240  2018-03-25 11:25  sendmessage\bin\Debug\sendmessage.exe
     文件       28160  2018-03-25 11:25  sendmessage\bin\Debug\sendmessage.pdb
     文件       22656  2018-03-25 11:30  sendmessage\bin\Debug\sendmessage.vshost.exe
     文件         490  2017-09-29 21:43  sendmessage\bin\Debug\sendmessage.vshost.exe.manifest
     目录           0  2018-03-24 22:24  sendmessage\bin\Release\
     文件         836  2018-03-25 11:25  sendmessage\clients.cs
     文件        3005  2018-03-24 22:48  sendmessage\clients.Designer.cs
     文件        5817  2018-03-24 22:48  sendmessage\clients.resx
     文件         827  2018-03-25 09:21  sendmessage\frmMain.cs
     文件        2993  2018-03-24 22:35  sendmessage\frmMain.Designer.cs
     文件        5817  2018-03-24 22:35  sendmessage\frmMain.resx
     目录           0  2018-03-24 22:24  sendmessage\obj\
     目录           0  2018-03-25 11:25  sendmessage\obj\Debug\
     文件        6794  2018-03-25 11:30  sendmessage\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
     文件         180  2018-03-24 22:48  sendmessage\obj\Debug\sendmessage.clients.resources
     文件         681  2018-03-25 11:30  sendmessage\obj\Debug\sendmessage.csproj.FileListAbsolute.txt
     文件        1039  2018-03-24 22:48  sendmessage\obj\Debug\sendmessage.csproj.GenerateResource.Cache
     文件        2211  2018-03-24 22:48  sendmessage\obj\Debug\sendmessage.csprojResolveAssemblyReference.cache
     文件       10240  2018-03-25 11:25  sendmessage\obj\Debug\sendmessage.exe
     文件         180  2018-03-24 22:48  sendmessage\obj\Debug\sendmessage.frmMain.resources
     文件       28160  2018-03-25 11:25  sendmessage\obj\Debug\sendmessage.pdb
     文件         180  2018-03-24 22:48  sendmessage\obj\Debug\sendmessage.Properties.Resources.resources
     目录           0  2018-03-24 22:24  sendmessage\obj\Debug\TempPE\
     文件         494  2018-03-24 22:24  sendmessage\Program.cs
     目录           0  2018-03-24 22:24  sendmessage\Properties\
     文件        1346  2018-03-24 22:24  sendmessage\Properties\AssemblyInfo.cs
     文件        2874  2018-03-24 22:24  sendmessage\Properties\Resources.Designer.cs
     文件        5612  2018-03-24 22:24  sendmessage\Properties\Resources.resx
............此处省略5个文件信息

评论

共有 条评论