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0aW9uQXJlYUhhbmRsZSwgU1dfSElERSkKICAgICAgICBFbmQgSWYKCiAgICAgICAgJyBXYXJ0ZW4gYmlzIGRhcyBQcm9ncmFtbSBtYW51ZWxsIGdlc2NobG9zc2VuIHdpcmQKICAgICAgICBDb25zb2xlLldyaXRlTGluZSgmcXVvdDtEciZ1dW1sO2NrZW4gU2llIGVpbmUgVGFzdGUsIHVtIGRpZSBUYXNrbGVpc3RlIHdpZWRlciBhbnp1emVpZ2VuLi4uJnF1b3Q7KQogICAgICAgIENvbnNvbGUuUmVhZEtleSgpCgogICAgICAgICcgVGFza2xlaXN0ZSB3aWVkZXIgYW56ZWlnZW4KICAgICAgICBTaG93V2luZG93KHRhc2tiYXJIYW5kbGUsIFNXX1NIT1cpCiAgICAgICAgU2hvd1dpbmRvdyhub3RpZmljYXRpb25BcmVhSGFuZGxlLCBTV19TSE9XKQogICAgRW5kIFN1YgpFbmQgTW9kdWxl
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