A Windows systray application that displays the current lunar phase.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.1 KiB

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Reflection;
namespace LunaWin
{
public partial class LunaForm : Form
{
const int DWMWA_TRANSITIONS_FORCEDISABLED = 3;
[DllImport("dwmapi", PreserveSig = true)]
static extern int DwmSetWindowAttribute(IntPtr hWnd, int attr, ref int value, int attrLen);
public LunaForm()
{
InitializeComponent();
// get current version number
System.Version prodVersion = Assembly.GetExecutingAssembly().GetName().Version;
string strVersion = String.Join(".", prodVersion.Major,prodVersion.Minor,prodVersion.Build);
// add version number to label text
// truncate version number
lblVersion.Text = prodVersion.ToString();
}
private void cmdHide_Click(object sender, EventArgs e)
{
Globals.lunaForm.Hide();
}
}
}