fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. // your code goes here
  8. }
  9. }
  10.  
Success #stdin #stdout 0.04s 21836KB
stdin
mports System.Runtime.InteropServices

Module TaskbarControl
    <DllImport("user32.dll")>
    Private Function FindWindow(lpClassName As String, lpWindowName As String) As IntPtr
    End Function

    <DllImport("user32.dll")>
    Private Function ShowWindow(hWnd As IntPtr, nCmdShow As Integer) As Integer
    End Function

    Const SW_HIDE As Integer = 0
    Const SW_SHOW As Integer = 5

    Sub Main()
        ' Taskleiste ausblenden
        Dim taskbarHandle As IntPtr = FindWindow("Shell_TrayWnd", Nothing)
        ShowWindow(taskbarHandle, SW_HIDE)

        ' Symbole ausblenden
        Dim notificationAreaHandle As IntPtr = FindWindow("Shell_SecondaryTrayWnd", Nothing)
        If notificationAreaHandle <> IntPtr.Zero Then
            ShowWindow(notificationAreaHandle, SW_HIDE)
        End If

        ' Warten bis das Programm manuell geschlossen wird
        Console.WriteLine("Drücken Sie eine Taste, um die Taskleiste wieder anzuzeigen...")
        Console.ReadKey()

        ' Taskleiste wieder anzeigen
        ShowWindow(taskbarHandle, SW_SHOW)
        ShowWindow(notificationAreaHandle, SW_SHOW)
    End Sub
End Module
stdout
Standard output is empty