SystemTrayMenu/UserInterface/TaskbarForm.cs
Markus Hofknecht 50231f5a3c #115, version 0.11.2.0
[Feature] Show icon in taskbar when application is running #115
2020-06-28 19:06:44 +02:00

27 lines
630 B
C#

using System.Drawing;
using System.Windows.Forms;
namespace SystemTrayMenu.UserInterface
{
public partial class TaskbarForm : Form
{
public TaskbarForm()
{
InitializeComponent();
SetLocation();
}
private void TaskbarForm_LocationChanged(object sender, System.EventArgs e)
{
SetLocation();
}
private void SetLocation()
{
Screen screen = Screen.PrimaryScreen;
Location = new Point(screen.Bounds.Right - Size.Width,
screen.Bounds.Bottom + 80); //Hide below taskbar
}
}
}