zoukankan      html  css  js  c++  java
  • 简单的WINFORM窗口,体验WINFORM带来的快感

    当习惯成为一种自然,就不再喜欢那种条条框框的规则
    using System;
    using System.Windows.Forms;
    
    namespace Window{
    class Window{
    static void Main(){
    Form form = new Form();
    form.Click += new EventHandler(form_Click);//注冊窗口单击事件
    Application.Run(form);
    }
    
    static void form_Click(object sender,EventArgs e){
    Form form = (Form)sender;
    form.Text = "Mouse Position X="+ Cursor.Position.X +",Y=" + Cursor.Position.Y;
    }
    }
    }
    
    实现的是:编译以后运行EXE得到一个可最大化最小化也能够关闭的窗口。而且单击窗口能够在标题上看到当前鼠标点击过的坐标 别说我非常浅显,事实上我也知道。总也奈不住的写下一点一滴。

  • 相关阅读:
    CMS、G1收集器
    一文入门Redis
    一文解析TCP/UDP
    ubuntu官方源
    一、单体架构分析
    netty简介2
    netty简介
    安装vmware tool
    jdk1.8安装(转载)
    HTTP1.0、HTTP1.1 和 HTTP2.0 的区别
  • 原文地址:https://www.cnblogs.com/gavanwanggw/p/6978585.html
Copyright © 2011-2022 走看看