mirror of
https://github.com/Hofknecht/SystemTrayMenu.git
synced 2024-09-30 17:16:52 +13:00
35 lines
856 B
C#
35 lines
856 B
C#
|
// <copyright file="TaskbarForm.cs" company="PlaceholderCompany">
|
|||
|
// Copyright (c) PlaceholderCompany. All rights reserved.
|
|||
|
// </copyright>
|
|||
|
|
|||
|
namespace SystemTrayMenu.UserInterface
|
|||
|
{
|
|||
|
using System.Drawing;
|
|||
|
using System.Windows.Forms;
|
|||
|
|
|||
|
public partial class TaskbarForm : Form
|
|||
|
{
|
|||
|
public TaskbarForm()
|
|||
|
{
|
|||
|
InitializeComponent();
|
|||
|
SetLocation();
|
|||
|
}
|
|||
|
|
|||
|
private void TaskbarForm_LocationChanged(object sender, System.EventArgs e)
|
|||
|
{
|
|||
|
SetLocation();
|
|||
|
}
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// Hide below taskbar.
|
|||
|
/// </summary>
|
|||
|
private void SetLocation()
|
|||
|
{
|
|||
|
Screen screen = Screen.PrimaryScreen;
|
|||
|
Location = new Point(
|
|||
|
screen.Bounds.Right - Size.Width,
|
|||
|
screen.Bounds.Bottom + 80);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|