- This topic explains how to hide taskbar or show taskbar using C#
- If we press Button1 Taskbar will hide and if we press button again, the taskbar will show.
User32 dll file – How to hide taskbar or show taskbar using C#
- user32.dll implements the Windows USER component that creates and manipulates the standard elements of the Windows user interface, such as the desktop, windows, and menus.
- It thus enables programs to implement a graphical user interface that matches the Windows look and feel.
- Programs call functions from Windows USER to perform operations such as creating and managing windows, receiving window messages (which are mostly user input such as mouse and keyboard events, but also notifications from the operating system), displaying text in a window, and displaying message boxes.
- Many of the functions in User32.dll call upon GDI functions exported by Gdi32.dll to do the actual rendering of the various elements of the user interface.
- Some types of programs will also call GDI functions directly to perform lower-level drawing operations within a window previously created via User32 functions.
How to hide taskbar or show taskbar using C# – Complete Code
public partial class Form1 : Form
private static extern int FindWindow(string className, string windowText);
private static extern int ShowWindow(int hwnd, int command);
private const int SW_HIDE = 0;
private const int SW_SHOW = 1;
private int taskBar;
private void Form1_Load(object sender, EventArgs e)
taskBar = FindWindow("Shell_TrayWnd", "");
private void button1_Click(object sender, EventArgs e)
if ((button1.Text == "Hide"))
button1.Text = "Show";
button1.Text = "Hide";
If you have any doubts regarding this topic How to hide taskbar or show taskbar using vb.net? Please contact us…
How to hide taskbar or show taskbar using C#