zoukankan      html  css  js  c++  java
  • 显示 隐藏任务栏中的开始按钮

    实现效果:

      

    知识运用:

      API函数FindWindowEx  //在窗口列表中寻找与指定条件相符的第一个子窗口

      

    实现代码:

            private const int SW_HIDE = 0;
            private const int SW_SHOW = 5;
            [DllImport("user32.dll")]           //寻找窗口列表中第一个符合指定条件的顶级窗口
            public static extern int FindWindow(string IpClassName, string IpWindowName);
            [DllImport("user32.dll")]           //控制窗口的可见性
            public static extern int ShowWindow(int hwnd, int nCmdShow);
            [DllImport("user32.dll")]           //在窗口列表中寻找与指定条件相符的第一个子窗口
            public static extern int FindWindowEx(int hWnd1,int hWnd2,string Ipsz1,string Ipsz2);
            private void button1_Click(object sender, EventArgs e)
            {
                if (radioButton1.Checked)
                    ShowWindow(FindWindowEx(FindWindow("Shell_TrayWnd", null), 0, "Start", null), SW_HIDE); //隐藏开始按钮  
                else
                    ShowWindow(FindWindowEx(FindWindow("Shell_TrayWnd", null), 0, "Start", null), SW_SHOW);//显示开始按钮
            }
    

      

  • 相关阅读:
    web(零)---tornado使用
    web(一)----tornado nginx配置
    pb- 使用
    Python排序算法之直接插入排序
    敏捷测试中发现的一些问题及改进办法
    加密算法
    共享内存与存储映射(mmap)
    mysql索引的性能分析
    mysql索引
    Innodb的存储及缓存
  • 原文地址:https://www.cnblogs.com/feiyucha/p/10311684.html
Copyright © 2011-2022 走看看