日期:2009-03-08 浏览次数:20525 次
public class TempConverter : System.WinForms.Form { . . . } |
this.SetSize(180,90); this.BorderStyle = FormBorderStyle.FixedDialog; this.Text = "°C->°F / °F->°C"; this.StartPosition = FormStartPosition.CenterScreen; this.HelpButton = false; this.MaximizeBox = false; |
public class TempConverter : System.WinForms.Form { public TempConverter() { this.SetSize(180,90); this.BorderStyle = FormBorderStyle.FixedDialog; this.Text = "°C->°F / °F->°C"; this.StartPosition = FormStartPosition.CenterScreen; this.HelpButton = false; this.MaximizeBox = false; } public static void Main() { Application.Run( new TempConverter() ); } } |
public class TempConverter : System.WinForms.Form { Label lTempFah = new Label(); Label lTempCel = new Label(); TextBox tTempFah = new TextBox(); TextBox tTempCel = new TextBox(); Button bnCtoF = new Button(); Button bnFtoC = new Button(); public TempConverter() { this.SetSize(180,90); this.BorderStyle = FormBorderStyle.FixedDialog; this.Text = "°C->°F / °F->°C"; this.StartPosition = FormStartPosition.CenterScreen; this.HelpButton = false; this.MaximizeBox = false; tTempCel.TabIndex = 0; tTempCel.SetSize(50,25); tTempCel.SetLocation(13,5); lTempCel.TabStop = false; lTempCel.Text = "°C"; lTempCel.SetSize(25, 25); lTempCel.SetLocation(65,5); tTempFah.TabIndex = 1; tTempFah.SetSize(50,25); tTempFah.SetLocation(90,5); lTempFah.TabStop = false; lTempFah.Text = "°F"; lTempFah.SetSize(25,25); lTempFah.SetLocation(142,5); bnCtoF.TabIndex = 2; bnCtoF.Text = "°C to °F"; bnCtoF.SetSize(70,25); bnCtoF.SetLocation(13,35); bnFtoC.TabIndex = 3; bnFtoC.Text = "°F to °C"; bnFtoC.SetSize(70,25); bnFtoC.SetLocation(90,35); this.Controls.Add(tTempCel);
免责声明: 本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
|