Hide taskbar using C #

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

I tried the codes using an online search. All of them hide the taskbar. But the problem is that when I open the notebook and maximize it, in fact it does not appear in full screen. Because the space where the taskbar was was still blocked by empty space. I want it to really fit in full screen mode.

+3
source share
4 answers

I did this by making a borderless application, maximizing and setting it as Topmost. Here's a great example from CodeProject.

, , .

+4

Windows ( ), .

( ):

  • regedit ( "" > regedit)
  • : HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon.
  • Shell explorer.exe , . C:\myKioskApp\Kiosk.exe

( ):

  • regedit ( "" > regedit).
  • : HKCU\Software\Microsoft\Windows NT\CurrentVersion\Winlogon.
  • (Edit > New > String Value), shell. , . C:\myKioskApp\Kiosk.exe
  • .
+6

You can hide the taskbar by setting the following properties of your C # form.

WindowState: Maximized FormBorderStyle: FixedDialog

0
source

in window 7 (or possibly higher) the use FormWindowState.Maximizedis wrong, since the maximum size will be FormWindowState.Maximizedout of the FormWindowState.Maximizedtasks, but you can do it

this.WindowState = FormWindowState.Normal; // or default
this.FormBorderStyle = FormBorderStyle.None;
this.TopMost = true;

// do it here
this.Location = new Point(0,0);
var fullscreenSize = new Size(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height);
this.Size = fullscreenSize;
0
source

Source: https://habr.com/ru/post/1716264/


All Articles