using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Mini_dbms
{
public partial class Form1 : Form
{
CreateDB.Form2 CR = new CreateDB.Form2();
public Form1()
{
InitializeComponent();
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
}
private void CreateToolStripMenuItem_Click(object sender, EventArgs e)
{
//CreateDB.Form2 CR = new CreateDB.Form2();
CR.Show(); // error in here while reopenig it<< ObjcetDisposedException was unhandled "cannot access a disposed object." >>
}
private void Main_Load(object sender, EventArgs e)
{
CR.FormClosed += new FormClosedEventHandler(CR_FormClosed);
}
void CR_FormClosed(object sender, FormClosedEventArgs e)
{
if (CR.flag == 1)
{
toolStripStatusLabel1.Text = "successfully created!";
}
else if(CR.flag==2)
{
toolStripStatusLabel1.Text = "Creation failed !";
}
}
}
}