private void Form3_Load(object sender, EventArgs e) { //初始化数据库 ldb = new LocalDb(); ldb.ConnLocalDb(); //初始化数据 GetList(); }
//form2的析构函数 private void init(object sender, EventArgs e) { Form2Handle = this.Handle; //初始化数据库 ldb = new LocalDb(); ldb.ConnLocalDb(); //指纹登记初始化 this.toolStripStatusLabel1.Text = "请将手指放在指纹感应器上!"; }
//加载窗口前,Load运行此方法 private void Form1_Load(object sender, EventArgs e) { FormHandle = this.Handle; //初始化数据库,通过微软的access创建数据库zxz_data.mdb //bool s= WindowsFormsApp1.LocalDb.CreateMDBDataBase("zxz_data.mdb");//创建数据库,第一次使用 ldb = new LocalDb(); ldb.ConnLocalDb(); connDevice.Enabled = false; bnClose.Enabled = false; button1.Enabled = false; }