在2003中继承窗体报这样的错误怎么解决?
 “试图创建 FinaSystem.Charge.FmChargeBase 的实例时发生异常。异常为“未将对象引用设置到对象的实例。”。
在错误中这样写的。。高分求!!!!!!!!!!!!!!!!!!!!!!!

解决方案 »

  1.   

    hdt(倦怠) 啥意思能不能说明白一些阿,,谢谢了,如果通了我给你加分阿,还有yuchangmao(学习孟子)
      

  2.   

    这是FmChargeBase代码:
    using System;
    using System.Drawing;
    using System.Collections;
    using System.ComponentModel;
    using System.Windows.Forms;
    using SysBusiness.BLL;
    using SysBusiness.Entire;
    using System.Data ;namespace FinaSystem.Charge
    {
    /// <summary>
    /// FmChargeBase 的摘要说明。
    /// </summary>
    public class FmChargeBase : System.Windows.Forms.Form
    {
    protected System.Windows.Forms.GroupBox gpseekinfo;
    protected System.Windows.Forms.GroupBox gpchargeinfo;
    private   System.ComponentModel.IContainer components =null;
    protected System.Windows.Forms.GroupBox groupBox1;
    protected System.Windows.Forms.Label lblmemo;
    protected System.Windows.Forms.Label lblmode;
    protected System.Windows.Forms.Label lbldate;
    protected System.Windows.Forms.Label lblpeople;
    protected System.Windows.Forms.Label lblcode;
    protected System.Windows.Forms.Label lblcharge;
    protected System.Windows.Forms.NumericUpDown chargemoney;
    protected System.Windows.Forms.Panel plcharge;
    protected System.Windows.Forms.Panel plstrictlist;
    protected internal System.Windows.Forms.Label lblbalance;
    protected System.Windows.Forms.Label lblwill;
    protected System.Windows.Forms.Label lblalready;
    protected System.Windows.Forms.Label lblmust;
    protected System.Windows.Forms.Panel plseek;
    protected System.Windows.Forms.Label lblterm;
    protected System.Windows.Forms.Label lblyear;
    protected System.Windows.Forms.Button btnseek;
    protected System.Windows.Forms.GroupBox gpchargitem;
    protected System.Windows.Forms.StatusBar statusBar1;
    protected System.Windows.Forms.Label lblxm;
    protected System.Windows.Forms.Label lblxh;
    protected System.Windows.Forms.Label lblsfzh;
    protected System.Windows.Forms.Label lblksh;
    protected System.Windows.Forms.Label lbljfzy;
    protected System.Windows.Forms.Label lblzxzy;
    protected System.Windows.Forms.Label lblbj;
    protected System.Windows.Forms.Label lblname;
    private System.Windows.Forms.StatusBarPanel statusBarPanel1;
    protected System.Windows.Forms.GroupBox gpstudentinfo;
    protected System.Windows.Forms.Label lblspecchange;
    protected System.Windows.Forms.TextBox tbxnowspec;
    protected System.Windows.Forms.TextBox tbxcurspec;
    protected System.Windows.Forms.TextBox tbxtzsh1;
    protected System.Windows.Forms.TextBox tbxidcard;
    protected System.Windows.Forms.TextBox tbxxh;
    protected System.Windows.Forms.TextBox tbxname1;
    protected System.Windows.Forms.ComboBox chargemode;
    protected System.Windows.Forms.CheckBox isloan;
    protected System.Windows.Forms.TextBox chargecode;
    protected System.Windows.Forms.TextBox chargepeople;
    protected System.Windows.Forms.TextBox tbxmemo;
    protected System.Windows.Forms.TextBox tbxname;
    protected System.Windows.Forms.TextBox tbxcommon;
    protected System.Windows.Forms.RadioButton rbtzsh;
    protected System.Windows.Forms.RadioButton rbidcard;
    protected System.Windows.Forms.TextBox tbxgrade;
    protected System.Windows.Forms.RadioButton rbxh;
    protected System.Windows.Forms.DateTimePicker dtp1;
    protected System.Windows.Forms.Button btnsave;
    protected System.Windows.Forms.Button chargeinlog;
    protected System.Windows.Forms.Button btnexit;
    protected System.Windows.Forms.PictureBox pictureBox1;
    protected System.Windows.Forms.Label label1;
    protected System.Windows.Forms.Label label2;
    protected System.Windows.Forms.Label label3;
    protected System.Windows.Forms.Panel plItems;
    protected System.Windows.Forms.ComboBox cmbterm;
    protected System.Windows.Forms.ComboBox cmbyear;

    #region 字段

    protected TStudent stuObject =null;
    protected IList stuList =null;
    protected TItemList UserfulList =null;
    protected TStudentBLL stuBLL =new TStudentBLL();
    protected YGTS curYgts ;
    protected string CurYear="",CurTerm="",CurGrade="";
    protected string OwnerGroup ="";
    protected TNoticeListBLL nlistObject =null; protected TNoticeList lastNoticeList =null;
    protected CommonBase baseObject =new CommonBase();
    protected System.Windows.Forms.Panel pnlinfo;
    protected System.Windows.Forms.PictureBox pbxchange;
    protected DataSet dsTemp =null;
    #endregion
    public FmChargeBase()
    {
    //
    // Windows 窗体设计器支持所必需的
    //
    InitializeComponent(); //
    // TODO: 在 InitializeComponent 调用后添加任何构造函数代码
    //

    } /// <summary>
    /// 清理所有正在使用的资源。
    /// </summary>
    protected override void Dispose( bool disposing )
    {
    if( disposing )
    {
    if(components != null)
    {
    components.Dispose();
    }
    }
    base.Dispose( disposing );
    }