Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hide the taskbar using C#

I am running Windows XP 64 bit. I want to hide the taskbar when I run my application.

I tried codes by searching the web. In all those, it hides the task bar. But the problem is, when i open a notepad and maximize it, it is not actually into full screen. Because the space where task bar was there is still blocked with empty space. I want it fit really into full screen mode.

like image 217
Anuya Avatar asked Jul 25 '26 19:07

Anuya


2 Answers

If you like to replace the windows shell (taskbar) you'll have to change a registry key.

Changing the default shell (all users):

  1. open regedit (start menu > run, and type in regedit)
  2. go to: HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon.
  3. Change Shell from explorer.exe to your program path and name e.g. c:\myKioskApp\Kiosk.exe

Changing the default shell (only current user):

  1. open regedit (start menu > run, and type in regedit).
  2. go to: HKCU\Software\Microsoft\Windows NT\CurrentVersion\Winlogon.
  3. add a new string value (Edit > New > String Value) called shell. and set the value to the path of the new shell e.g. c:\myKioskApp\Kiosk.exe
  4. log out and log back in.
like image 198
Oliver Avatar answered Jul 28 '26 09:07

Oliver


I've done this by making the application borderless, maximized, and setting it to be Topmost. Here's a perfect example from CodeProject.

As one of the commenters has said, replacing disabling Explorer and running your application might be the best way, security-wise.

like image 45
Charlie Salts Avatar answered Jul 28 '26 09:07

Charlie Salts



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!