c# winform 任务栏显示和隐藏
生活随笔
收集整理的這篇文章主要介紹了
c# winform 任务栏显示和隐藏
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;namespace you_name
{internal class taskbar{private const int SW_HIDE = 0; //隱藏任務欄private const int SW_RESTORE = 9;//顯示任務欄[DllImport("user32.dll")]public static extern int ShowWindow(int hwnd, int nCmdShow);[DllImport("user32.dll")]public static extern int FindWindow(string lpClassName, string lpWindowName);/// <summary>/// 顯示任務欄/// </summary>public static void showtask(){ShowWindow(FindWindow("Shell_TrayWnd", null), SW_RESTORE);}/// <summary>/// 隱藏任務欄/// </summary>public static void Hidetask(){ShowWindow(FindWindow("Shell_TrayWnd", null), SW_HIDE);}}
}
總結
以上是生活随笔為你收集整理的c# winform 任务栏显示和隐藏的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 苹果无线耳机连接不上_苹果AirPods
- 下一篇: 544、RabbitMQ详细入门教程系列