zoukankan      html  css  js  c++  java
  • c#在线程中打开类似msn的消息提示窗口

      // 启动线程  
     private void button2_Click(object sender, System.EventArgs e)
       {
        Thread receivex = new Thread(new ThreadStart(this.showwiindow));
        receivex.Start();
        Thread.Sleep(6000);
       }

      delegate void showwiindowHandler();
      private void showwiindow()
      {
       if (this.InvokeRequired)
       {
        showwiindowHandler si = new showwiindowHandler(this.showwiindow);
        this.BeginInvoke(si, new object[0]);
        return;      //这里要返回,把函数调用权交给this的创建线程
       }

       //这里是其它的代码  调用类似msn的消息提示窗口
       Message form=new Message();
       form.HeightMax=120;
       form.WidthMax=148;
       form.ScrollShow();
      }

  • 相关阅读:
    Python调用C++的DLL
    Go-map
    Go-切片
    Go-数组
    Go-流程控制
    Go-运算符
    Go-变量和常量
    Go-VS Code配置Go语言开发环境
    Go-跨平台编译
    Go-从零开始搭建Go语言开发环境
  • 原文地址:https://www.cnblogs.com/flashicp/p/690054.html
Copyright © 2011-2022 走看看