以下の内容はhttps://www.chuken-engineer.com/entry/2019/08/16/140043より取得しました。


【C#.net VB.net】windowsのタスクバーを非表示にする

1.概要

アプリケーションの仕様上、タスクバーが非常に邪魔な時がありました。
その為、表示、非表示の制御を行うようにしました。
制御はWIN32APIから行います。

2.スクリプト

Public Declare Auto Function FindWindow Lib "USER32.DLL" (ByVal lpClassName As String, ByVal lpWindowName As String) As IntPtr
Public Declare Auto Function ShowWindow Lib "USER32.DLL" (ByVal hWnd As IntPtr, ByVal nCmdShow As Integer) As Boolean

Private Const SW_SHOW As Integer = 5
Private Const SW_HIDE As Integer = 0
Private hwnd As IntPtr = FindWindow("Shell_TrayWnd", vbNullString)

Public Sub tskBarHide()
	ShowWindow(hwnd, SW_HIDE)
End Sub

Public Sub tskBarDisp()
	ShowWindow(hwnd, SW_SHOW)
End Sub

[DllImport("USER32.DLL", CharSet = CharSet.Auto)]
public static extern IntPtr FindWindow(string lpClassName, string lpWindowName);

[DllImport("USER32.DLL", CharSet = CharSet.Auto)]
public static extern IntPtr ShowWindow(IntPtr hWnd, int nCmdShow);

private static int SW_SHOW = 5;
private static int SW_HIDE = 0;
private IntPtr hwnd = FindWindow("Shell_TrayWnd", null);

public void tskBarHide()
{
    ShowWindow(hwnd, SW_HIDE);
}

public void tskBarDisp()
{
    ShowWindow(hwnd, SW_SHOW);
}




以上の内容はhttps://www.chuken-engineer.com/entry/2019/08/16/140043より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14