Code For the shortcut keys to open the list
if (e.KeyCode == Keys.B && e.Modifiers == Keys.Control)
{
OpenCloseForms OpenSupplierList = new OpenCloseForms();
OpenSupplierList.OpenListSupplierForm();
OpenSupplierList.CloseSupplierForm();
}
Code for the datagrid view click that passes data to the form
OpenCloseForms form2 = new OpenCloseForms();
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex > 0 && e.ColumnIndex > 0)
{
form2.OpenSupplierForm();
string supplierCode1 = dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString();
form2.SetSupplierCode(supplierCode1);
//form2.CloseSupplierForm();
}
else MessageBox.Show("Value wrong");
}
I have tried a few things including this.close(); on the instances of the form with no success. Anyone have any ideas on how i could correct this and point me in he right direction any help at all appropriated.

New Topic/Question
Reply



MultiQuote





|