C#窗体显示

public partial class Login : Form
{
Timer T;
public Login()
{
InitializeComponent();
T = new Timer();
T.Interval =1;
T.Tick += new EventHandler(timer1_Tick);
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
}

void timer1_Tick(object sender, EventArgs e)
{
if (this.Size.Width < 1024 || this.Size.Height < 768)
{
this.Size = new Size(this.Size.Width + 100, this.Height + 80);
this.CenterToScreen();
}
}

private void Login_Load(object sender, EventArgs e)
{
T.Start();
}


}

posted on 2014-04-01 15:37  连一粝  阅读(266)  评论(0编辑  收藏  举报

导航