2020-06-28 01:50:36 +12:00
|
|
|
|
using System.Drawing;
|
2020-06-27 21:01:12 +12:00
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
|
|
|
|
|
namespace SystemTrayMenu.UserInterface
|
|
|
|
|
{
|
|
|
|
|
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-06-29 01:17:23 +12:00
|
|
|
|
Location = new Point(screen.Bounds.Right - Size.Width,
|
|
|
|
|
//we could show behind taskbar?
|
|
|
|
|
//screen.Bounds.Bottom- Size.Height);
|
|
|
|
|
//but at the moment we dont want to see this
|
|
|
|
|
screen.Bounds.Bottom); // - Size.Height);
|
2020-06-27 21:01:12 +12:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|