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。

  • 相关阅读:
    jira启动错误解决:Failed to read artifact descriptor for com.atlassian.plugins.rest:atlassian-rest-doclet:jar:2.9.2:
    jira8.0 api变化--含解决方法
    jira spring scanner注意事項
    pom文件添加aliyun镜像
    jira插件打包时报osgi的错误
    jira 根据项目(project)获取优先级(proirity)
    scriptrunner fragments设置web resource的路径
    Ubuntu16.04 LTS上安装Go1.10
    ubuntu 常见错误--Could not get lock /var/lib/dpkg/lock 问题修改
    VS2015编译OpenSSL
  • 原文地址:https://www.cnblogs.com/winnxm/p/1072300.html
Copyright © 2011-2022 走看看