たるきちのあれこれ









  Topプログラミングサンプル ▶ (タスクバーを除いた)画面の幅と高さを取得

(タスクバーを除いた)画面の幅と高さを取得するサンプルです。

C#

// タスクバーを除いた画面の幅(int)
Screen.PrimaryScreen.WorkingArea.Width

// タスクバーを除いた画面の高さ(int)
Screen.PrimaryScreen.WorkingArea.Height

// 画面の幅(int)
Screen.PrimaryScreen.Bounds.Width

// 画面の高さ(int)
Screen.PrimaryScreen.Bounds.Height