C# 飘动动画窗体
所需要用到的控件工具为【Labell、GroupBox、Timer、button】
Labell属性设置
1.Text属性为“飘动动画窗体”;
2.AutoSize属性为false;
3.BorderStyle属性为Fixed3D;
GroupBox属性设置
1.Text属性为“飘动动画窗体的控制”;
Timer属性设置
1.interval属性为20;
2.Enable属性为false;
button属性设置
Text属性分别为:水平移动、垂直移动、移动窗体、停止飘动
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WindowsFormsApp1
{
public partial class Form1 : Form
{
int swidth = SystemInformation.PrimaryMonitorMaximizedWindowSize.Width;
int sheight = SystemInformation.PrimaryMonitorMaximizedWindowSize.Height;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
this.timer1