[WinForm10-25作业]1.用Size和Location改变控件的大小和位置,使用Point结构体做
Posted on 2009-10-27 11:27 Relax Active 阅读(370) 评论(0) 收藏 举报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 WindowsFormsApplication7
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
Point pt = new Point(200,100);
this.textBox1.Size = new Size(pt); //改变控件大小!
textBox1.Location = new Point(20, 20);//改变控件位置!
}
}
}
浙公网安备 33010602011771号