2020-07-07 07:15:45 +12:00
|
|
|
|
// <copyright file="TaskbarForm.cs" company="PlaceholderCompany">
|
|
|
|
|
// Copyright (c) PlaceholderCompany. All rights reserved.
|
|
|
|
|
// </copyright>
|
2020-06-27 21:01:12 +12:00
|
|
|
|
|
|
|
|
|
namespace SystemTrayMenu.UserInterface
|
|
|
|
|
{
|
2020-07-07 07:15:45 +12:00
|
|
|
|
using System.Drawing;
|
|
|
|
|
using System.Windows.Forms;
|
2020-07-07 09:37:55 +12:00
|
|
|
|
|
2020-06-27 21:01:12 +12:00
|
|
|
|
public partial class TaskbarForm : Form
|
|
|
|
|
{
|
|
|
|
|
public TaskbarForm()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
2020-06-29 01:17:23 +12:00
|
|
|
|
SetLocation();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void TaskbarForm_LocationChanged(object sender, System.EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
SetLocation();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void SetLocation()
|
|
|
|
|
{
|
2020-06-28 01:50:36 +12:00
|
|
|
|
Screen screen = Screen.PrimaryScreen;
|
2020-07-07 09:37:55 +12:00
|
|
|
|
Location = new Point(
|
|
|
|
|
screen.Bounds.Right - Size.Width,
|
|
|
|
|
screen.Bounds.Bottom + 80); // Hide below taskbar
|
2020-06-27 21:01:12 +12:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|