show.cs

来自「软件功主要功能: 日程安排、事件提醒、以及其他用户自定义事件」· CS 代码 · 共 59 行

CS
59
字号
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Media;

namespace 电子便条
{
    public partial class Show : Form
    {
        public Show(string x)
        {
            InitializeComponent();
           
            label1.Text = x;
            this.Location = new Point(Screen.PrimaryScreen.WorkingArea.Width - 213, Screen.PrimaryScreen.WorkingArea.Height);
        }
        static int w;
        private void Show_Load(object sender, EventArgs e)
        {
            System.Media.SystemSounds.Beep.Play();
        }

        private void tmstart_Tick(object sender, EventArgs e)
        {
            if (this.Location.Y > Screen.PrimaryScreen.WorkingArea.Height - 146)
            {
                w++;
                this.Location = new Point(Screen.PrimaryScreen.WorkingArea.Width - 213, Screen.PrimaryScreen.WorkingArea.Height - w);

            }
            else if (this.Location.Y == Screen.PrimaryScreen.WorkingArea.Height-146)
            {
                tmmid.Enabled = true;
                tmstart.Enabled = false; 
            }
        }

        private void tmmid_Tick(object sender, EventArgs e)
        {
            tmend.Enabled = true;
            tmmid.Enabled = false;
        }

        private void tmend_Tick(object sender, EventArgs e)
        {
            w--;
            this.Location = new Point(Screen.PrimaryScreen.WorkingArea.Width - 213, Screen.PrimaryScreen.WorkingArea.Height - w);
            if (this.Location.Y == Screen.PrimaryScreen.WorkingArea.Height)
            {
                tmend.Enabled = false;
                this.Close();
            }
        }
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?