⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 像qq一样停靠.txt

📁 非常好的.net学习经验记录
💻 TXT
字号:
	private void timer1_Tick(object sender, EventArgs e) 
		{
			if (this.WindowState != System.Windows.Forms.FormWindowState.Minimized) 
			{
				if (Cursor.Position.X > this.Left && Cursor.Position.X < this.Right && Cursor.Position.Y > this.Top && Cursor.Position.Y < this.Bottom) 
				{
					if (this.Top < 0) 
					{
						this.Top = -5;
						this.Show();
					} 
					else if (this.Left < 0) 
					{
						this.Left = -5;
						this.Show();
					} 
					else if (this.Left + this.Width >= Screen.PrimaryScreen.WorkingArea.Width) 
					{
						this.Left = Screen.PrimaryScreen.WorkingArea.Width - this.Width + 5;
						this.Show();
					}
				} 
				else 
				{
					/******************变化处******************/
					if (this.Top <= 4) 
					{
						this.Top = 5 - this.Height;
						if (this.Left <= 4) 
						{
							this.Left =-5;
						} 
						else if (this.Left + this.Width >= Screen.PrimaryScreen.WorkingArea.Width - 4) 
						{
							this.Left = Screen.PrimaryScreen.WorkingArea.Width - this.Width + 5;
						}
						/******************变化处******************/
					} 
					else if (this.Left <= 4) 
					{
						this.Left = 5 - this.Width;
					} 
					else if (this.Left + this.Width >= Screen.PrimaryScreen.WorkingArea.Width - 4) 
					{
						this.Left = Screen.PrimaryScreen.WorkingArea.Width - 5;
					}
				}
			}
		}

⌨️ 快捷键说明

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