C# 代码..! 帮我解释一下

来源:百度知道 编辑:UC知道 时间:2024/06/15 20:22:12
代码如下:

帮我解释一下代码的意思.! 注释写详细了. 分只管要.!

只要我有,尽管给.!

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WindowsApplication1
{
public partial class Form1 : Form
{
int x = 0;
int y = 0;
public Form1()
{
InitializeComponent();
Form.CheckForIllegalCrossThreadCalls = false;
x = Screen.PrimaryScreen.Bounds.Width - this.Width;
y = Screen.PrimaryScreen.Bounds.Height;
}

private void Form1_Load(object sender, EventArgs e)
{
this.Location = new Point(x, y);
timer1.Start();
}

private void timer1_Tick(object sender, EventArgs e)
{

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WindowsApplication1
{
public partial class Form1 : Form
{
int x = 0;
int y = 0;
public Form1()
{
InitializeComponent();
Form.CheckForIllegalCrossThreadCalls = false;
x = Screen.PrimaryScreen.Bounds.Width - this.Width; //获取 屏幕宽度-窗体宽度
y = Screen.PrimaryScreen.Bounds.Height; //获取屏幕高度
}

private void Form1_Load(object sender, EventArgs e)
{
this.Location = new Point(x, y); //设置窗体左上角的位置
timer1.Start(); //开始计时器
}

private void timer1_Tick(object sender, EventArgs e)
{
y = y - 10;
th