Form1.cs
上传用户:huajielb
上传日期:2022-08-10
资源大小:35k
文件大小:1k
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- namespace Case01_5
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void Form1_Load(object sender, EventArgs e)
- {
- this.timer1.Interval = 10;
- this.timer1.Enabled = true;
- this.WindowState = FormWindowState.Maximized;
- }
- private void timer1_Tick(object sender, EventArgs e)
- {
- label1.Left = label1.Left - 3;
- if (label1.Right < 0)
- {
- label1.Left = this.Width;
- }
- }
- private void label1_Click(object sender, EventArgs e)
- {
- this.Close();
- }
- }
- }