Convert from C# to VC++2010 dataGridView Enter-Key Movements?
-
Hi, I like to convert the following codes from c# to VC++2010. Thanks for the helps. Actually the codes for dataGridView - Enter Key movement from one cell to another cell [like a tab key...]
public class MyDataGrid : DataGridView
{
// FOR ENTER KEY PROCESS WITH DATAGRIDVIEW
protected override bool ProcessDialogKey(Keys keyData)
{
Keys key = keyData & Keys.KeyCode;
if (key == Keys.Enter)
{
base.OnKeyDown(new KeyEventArgs(keyData));
return true;
}
else
{
return base.ProcessDialogKey(keyData);
}
}
//Class End
}Thanks :thumbsup:
-
Hi, I like to convert the following codes from c# to VC++2010. Thanks for the helps. Actually the codes for dataGridView - Enter Key movement from one cell to another cell [like a tab key...]
public class MyDataGrid : DataGridView
{
// FOR ENTER KEY PROCESS WITH DATAGRIDVIEW
protected override bool ProcessDialogKey(Keys keyData)
{
Keys key = keyData & Keys.KeyCode;
if (key == Keys.Enter)
{
base.OnKeyDown(new KeyEventArgs(keyData));
return true;
}
else
{
return base.ProcessDialogKey(keyData);
}
}
//Class End
}Thanks :thumbsup:
public ref class MyDataGrid : DataGridView
{
protected:
virtual bool ProcessDialogKey(Keys ^keyData) override
{
Keys ^key = keyData & Keys::KeyCode;
if (key == Keys::Enter)
{
DataGridView::OnKeyDown(gcnew KeyEventArgs(keyData));
return true;
}
else
{
return DataGridView::ProcessDialogKey(keyData);
}
}
};David Anton Convert between VB, C#, C++, & Java www.tangiblesoftwaresolutions.com