C#一点问题
using System;using System.Collections.Generic;
using
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
static int x = 200;
static int y = 200;
static int count = 0;
private void button1_click(object sender, EventArgs e)
{
Form1 form2 = new Form1();
form2.FormBorderStyle = FormBorderStyle.Fixed3D;
form2.Cursor = Cursor.hand;
form2.SetDesktopBounds(x, y);
form2.Visible = true;
x += 30;
y += 30;
this.Activate();
this.button1.enabled = false;
Label1.text = "新窗体的坐标(“+X+”,“+Y+”)";
label2.text = "这是第" + count + "个窗体";
}
private void Form1_Load(object sender, EventArgs e)
{
count += 1;
}
private void form1_formclosed(object sender, FormClosedEventArgs e)
{
count -= 1;
}
private void button2_click(object sender, EventArgs e)
{
this.Hide();
}
}
}
运行的时候出错,我做一个窗体的设计界面