using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
using System.Windows.Forms;
namespace YL.Code
{
    public class util
    {
        [DllImport("user32.dll", EntryPoint = "FindWindow", CharSet = CharSet.Auto)]
        private extern static IntPtr FindWindow(string classname, string captionName);
        [DllImport("user32.dll", EntryPoint = "FindWindowEx", CharSet = CharSet.Auto)]
        private extern static IntPtr FindWindowEx(IntPtr parent, IntPtr child, string classname, string captionName);
        [DllImport("user32.dll")]
        static extern IntPtr SendMessage(IntPtr hWnd, UInt32 Msg, IntPtr wParam, [MarshalAs(UnmanagedType.LPStr)] string lParam);
        [DllImport("user32.dll")]
        [return: MarshalAs(UnmanagedType.Bool)]
        static extern bool SetForegroundWindow(IntPtr hWnd);         [DllImport("user32", EntryPoint = "EnableWindow")]
        public static extern int EnableWindow(int hwnd, int fEnable);         [DllImport("user32.dll")]
        static extern bool EnableWindow(IntPtr hWnd, bool bEnable);         [DllImport("user32.dll")]
        static extern bool ShowWindow(IntPtr hWnd, int nCmdShow);         public void hideEscButton()
        {
            try
            {                 IntPtr hWnd1 = FindWindow(null, "照片处理");
                IntPtr hWnd2 = FindWindowEx(hWnd1, IntPtr.Zero, "WindowsForms10.BUTTON.app.0.3b93019_r14_ad1", null);
                if (hWnd2 == IntPtr.Zero) return;                 uint WM_SHOWWINDOW = 0x18;
                ShowWindow(hWnd2, 0);
               
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }         }
    }
}

最新文章

  1. python 之sqlalchemy many to many
  2. C++ GPU && CPU
  3. java连接mysql(一)
  4. Deeplearning原文作者Hinton代码注解
  5. 跌跌撞撞,用MAVEN看图说话的编译了一个JAR出来
  6. 【零基础学习iOS开发】【02-C语言】09-流程控制
  7. ANDROID_MARS学习笔记_S01_009Relative_LAYOUT例子
  8. [每日一题] OCP1z0-047 :2013-08-14 如何理解USING INDEX?...................................41
  9. Java System类
  10. 『Python』 多线程 共享变量的实现
  11. python切片练习
  12. windows下用cordova构建android app
  13. [SDOI2012]Longge的问题
  14. 423 重温Java Script and jQuery 葵花宝典 Bootstrap
  15. Python3 open函数
  16. net core体系-web应用程序-4asp.net core2.0 项目实战(1)-9项目各种全局帮助类
  17. gitlab+jenkins+tomcat war包部署(此文有新版本)
  18. 20155205 《Java程序设计》实验一(Java开发环境的熟悉)实验报告
  19. In case of failure
  20. Ultra-QuickSort---poj2299 (归并排序.逆序数.树状数组.离散化)

热门文章

  1. IOS AppDelegate常用方法
  2. iOS将大文件映射到内存(读取大文件)
  3. 【BZOJ1045】糖果传递(基于贪心的数学题)
  4. 求和VII
  5. Windows8.1任务栏取消oneDrive图标
  6. 使用 Repeater方式和完全静态页面使用AJAX读取和提交数据
  7. 课堂使用的Linux命令
  8. ZJOI2019Round#1
  9. Centos7 PHP的安装和配置
  10. Java 替换word文档文字,指定位置插入图片