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。

  • 相关阅读:
    如何学习 websocket ?
    如何使用 C++ Inja html template 模板
    使用 QSqlTableModel 模型向数据库中插入数据时,为什么使用 rowCount 函数只能返回 256 最大值?
    windows 如何配置 Go 环境(Zip archive 方式)?
    qt 如何使用 lamda 表达式接收线程中发射的数据,并在里面更新 UI ?
    如何使用 VLD 检测程序中的内存泄漏?
    Qt 在相同的线程中可以在信号中传递未注册的元对象,在非相同线程中则不能传递未测试的对象,为什么呢?
    《LeetBook》leetcode题解(5):Longest Palindromic [M]——回文串判断
    《LeetBook》leetcode题解(4): Median of Two Sorted Arrays[H]——两个有序数组中值问题
    《Algorithms算法》笔记:元素排序(4)——凸包问题
  • 原文地址:https://www.cnblogs.com/winnxm/p/1072300.html
Copyright © 2011-2022 走看看