John Spiegel
8/12/2003 1:22:00 PM
Hi all,
I've got the code shown at the end. When I compile and run the form from
the CLI, a blank form shows (no button is visible). What's my newbie
mistake???
TIA,
John
using System;
using System.Drawing;
using System.ComponentModel;
using System.Windows.Forms;
public class CalculatorForm : Form
{
private Container Components;
private Button btnCalculate;
public void CaclulatorForm()
{
InitializeComponent();
}
private void InitializeComponent()
{
Components = new Container();
btnCalculate = new Button();
btnCalculate.Text = "Calculate";
btnCalculate.Click +=
new EventHandler (btnCalculate_Click);
btnCalculate.Location = new Point(94, 80);
btnCalculate.Size = new Size(75, 23);
btnCalculate.TabIndex = 0;
btnCalculate.Visible = true;
Controls.Add(btnCalculate);
}
protected void btnCalculate_Click (object sender,
System.EventArgs e)
{
}
public static void Main(string[] args)
{
Application.Run(new CalculatorForm());
}
}