S
Steven C
Hello:
I am trying to do in C#, what I have done for years in Visual Foxpro.
I am trying to set up base form classes, so that I can inherit
behavior in child classes. Specificallly, I am trying to build a
navigation form base class, ie, a form with a SAVE and a CANCEL
commandbutton on it. The problem is, when I instantiate the form (The
SAVECANCEL form), I cannot see the commandbuttons:
What am I missing?
Thanks!
Steven
using System;
using System.Windows.Forms;
using C.Base.Controls;
using System.Drawing;
namespace C.Base.Forms
{
/// <summary>
/// Base Form Object For This Application.
/// </summary>
public class CBaseForm : System.Windows.Forms.Form
{
public CBaseForm()
{
this.Width = 600;
this.Height = 400;
this.BackColor = Color.LightBlue;
}
}
public class CSaveCancelForm : System.Windows.Forms.Form
{
public CSaveCancelForm()
{
CBaseCmdButton cmdSave = new
C.Base.Controls.CBaseCmdButton();
cmdSave.Left = 5;
cmdSave.Top = 5;
cmdSave.Text = "Save";
cmdSave.Visible = true;
CBaseCmdButton cmdCancel = new
C.Base.Controls.CBaseCmdButton();
cmdCancel.Left = 75;
cmdCancel.Top = 100;
cmdCancel.Text = "Cancel";
cmdCancel.Visible = true;
}
}
}
I am trying to do in C#, what I have done for years in Visual Foxpro.
I am trying to set up base form classes, so that I can inherit
behavior in child classes. Specificallly, I am trying to build a
navigation form base class, ie, a form with a SAVE and a CANCEL
commandbutton on it. The problem is, when I instantiate the form (The
SAVECANCEL form), I cannot see the commandbuttons:
What am I missing?
Thanks!
Steven
using System;
using System.Windows.Forms;
using C.Base.Controls;
using System.Drawing;
namespace C.Base.Forms
{
/// <summary>
/// Base Form Object For This Application.
/// </summary>
public class CBaseForm : System.Windows.Forms.Form
{
public CBaseForm()
{
this.Width = 600;
this.Height = 400;
this.BackColor = Color.LightBlue;
}
}
public class CSaveCancelForm : System.Windows.Forms.Form
{
public CSaveCancelForm()
{
CBaseCmdButton cmdSave = new
C.Base.Controls.CBaseCmdButton();
cmdSave.Left = 5;
cmdSave.Top = 5;
cmdSave.Text = "Save";
cmdSave.Visible = true;
CBaseCmdButton cmdCancel = new
C.Base.Controls.CBaseCmdButton();
cmdCancel.Left = 75;
cmdCancel.Top = 100;
cmdCancel.Text = "Cancel";
cmdCancel.Visible = true;
}
}
}