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 MCRun { public partial class SizeChange : Form { Form main; public SizeChange(Form frm) { InitializeComponent(); main = frm; } private void Initial() { this.txt_kuan.Text = main.Size.Width.ToString(); this.txt_gao.Text = main.Size.Height.ToString(); } private void btn_cancel_Click(object sender, EventArgs e) { this.Close(); } private void btn_query_Click(object sender, EventArgs e) { try { int width = Convert.ToInt32(this.txt_kuan.Text); int height = Convert.ToInt32(this.txt_gao.Text); //main.Size.Width = width; //main.Size.Height = height; } catch(Exception ex) { MessageBox.Show("修改失败"); } } } }