Hi friends

i have made a software using VC#2010 express edition

targetted .net framework is 2.0

in my window i have installed .net framework 4.0

this is the code of OCR button


private void btnOCR_Click(object sender, EventArgs e)
{
///////////////////////////////////////////////////////////////////
if (path == null)
{
MessageBox.Show("Please Load an Image!");
return;
}


System.Drawing.Bitmap imageX = new Bitmap(pb1.Image);
System.Drawing.Bitmap image = AForge.Imaging.Image.Clone(imageX, System.Drawing.Imaging.PixelFormat.Format24bppRgb);

tessnet2.Tesseract ocr = new tessnet2.Tesseract();
ocr.Init(null, "eng", false);

List<tessnet2.Word> result = ocr.DoOCR(image, Rectangle.Empty);



foreach (tessnet2.Word word in result)
{
t.Text= t.Text + word.Text + Environment.NewLine;
}

}

but when i click on OCR button if the first if statment is true it return the message i configured

but if i have loaded the image it close the application
NO ERROR, No EXCEPTION issue i dont understand why my application get closed

please help me to find a solution.