Hi Guys,
i've got a Form that i call and in the constructor it does some db processing, in some cases the db will return a null row so rather than show the form i want to display a message "Cannot find bal bal" and then Close/Dispose the form before it shows. it works fine except that the Close() methos is ignored and the form always shows. i tried dispose and again it continue exceuting until an exception, cannot access disposed resource....
public Form()
{
try
{
DataTable tbl = DB.GetData();
if(tbl.Rows.Count>0)
{
//Do As Normal
}
else
{
Close();
}
//do some more processing
}
}
but the close call never takes effect it continues on and does more processing..
has anyone seen this before,
kind regards
michael