通过win32api让c#控制Windows任务栏
来源:互联网 发布:男性脱发 知乎 编辑:程序博客网 时间:2024/06/06 09:04
如果你要在你的C#程序中控制Windows的任务栏,有两个Windows api 可以帮到你!他们就是 FindWindowA 和 ShowWindow
C#中声明如下:
using System.Runtime.InteropServices;
[DllImport("user32.dll", EntryPoint = "FindWindowA")]
public static extern IntPtr FindWindowA(string lp1, string lp2);
[DllImport("user32.dll", EntryPoint = "ShowWindow")]
public static extern IntPtr ShowWindow(IntPtr hWnd, int _value);
其实Windows的任务栏就是一个特殊的窗口,所以操作窗口的方法,对任务栏一样适合!控制代码如下:
//获取任务栏
IntPtr hTray = Form1.FindWindowA("Shell_TrayWnd", String.Empty);
//显示任务栏
Form1.ShowWindow(hTray, 5);
//隐藏任务栏
Form1.ShowWindow(hTray, 0);
- 通过win32api让c#控制Windows任务栏
- 通过win32api让c#控制Windows任务栏
- 通过win32api让c#控制Windows任务栏
- C#程序中控制Windows的任务栏
- 全面控制Windows任务栏
- Delphi 全面控制Windows任务栏
- c#隐藏/显示Windows任务栏
- 用 VC5 控制 Windows 任务栏图标
- C#引入Win32API:常用Win32API
- 通过API实现C#任务栏光标闪烁
- c#中添加Windows任务栏右键菜单
- 让Windows XP用上Windows 7的任务栏
- C#中使用Win32API
- C# 和 Win32API
- C# Win32API类
- C#調用WIN32API(轉)
- C# 和 Win32API
- 关于c#调用win32api
- java网络编程之聊天室客户端(二)
- 神州数码组织级项目管理发展历程
- 聊天室服务器端软件源代码
- 用Microsoft SQL和数据库进行连接时要注意的问题:
- hibernate领袖看软件设计与开发管理
- 通过win32api让c#控制Windows任务栏
- 软件工程实践者的思想
- 浙江大学历史系教师告考生书
- design pattern : Observer
- Log4J深入浅出
- 死于贫困交加的七位美国总统
- VMworkstation快捷键
- C#常用函数方法
- CSDN Blog在Google中的特殊印记