zoukankan      html  css  js  c++  java
  • 界面锁鼠标[原创]

    在项目中,需将鼠标锁定在主界面中,且鼠标不能跑到客显上去,于是有了下面的代码:
      1using System;
      2using System.Collections.Generic;
      3using System.Text;
      4
      5namespace convert
      6{
      7    class Class4
      8    {
      9        一个鼠标类

    177        #endregion
    178
    179}

    180

    使用如下:
     1using System;
     2using System.Collections.Generic;
     3using System.Text;
     4using System.Windows.Forms;
     5
     6namespace convert
     7{
     8    public class loadform:ApplicationContext 
     9    {
    10        public loadform()
    11            :base()
    12        {
    13            Form5 ff = new Form5();      
    14            
    15            ff.Show();
    16            Class4.Lock(ff);
    17            Class4.Enable(ff);
    18           
    19        }

    20    }

    21}

    22
    注意,窗体须不能改变大小,可将窗体的FormBorderStyle 设置为None。

  • 相关阅读:
    逆序数
    Java处理对象
    Java8增强的包装类
    Java初始化块
    Linux- Linux软件配置
    Python- 【python无法更新pip】提示python.exe: No module named pip
    Error- Overloaded method value createDirectStream in error Spark Streaming打包报错
    Error- spark streaming 打包将全部依赖打进去Invalid signature file digest for Manifest main attributes
    Spark- Spark从SFTP中读取zip压缩文件数据做计算
    JAVA- 内部类及匿名内部类
  • 原文地址:https://www.cnblogs.com/winnxm/p/1072300.html
Copyright © 2011-2022 走看看