[RESOLVED] Datagridview Class VS 2010 working but not working in VS2015
Hi, Iam using VS2015. Before I used VS2010. For Dynamic DataGridView to ProcessDialogKey , I write the following code works well in VC++ 2010 Windows forms. Now I wish to use that class, but not working.
Receiving the error message 'Failed to load toolbox item MyDataGrid. It will be removed from the toolbox'.
Thanks for the helps.
My codes:
Code:
MyDataGrid.h
using namespace System;
using namespace System::Windows::Forms;
#pragma once
public ref class MyDataGrid : DataGridView
{
protected:
virtual bool ProcessDialogKey(Keys keyData) override;
};
MyDataGrid.cpp
#include "StdAfx.h"
#include "MyDataGrid.h"
using namespace System;
using namespace System::Windows::Forms;
bool MyDataGrid::ProcessDialogKey(Keys keyData) {
Keys key = keyData & (System::Windows::Forms::Keys::KeyCode);
if (key == System::Windows::Forms::Keys::Enter) {
DataGridView::OnKeyDown(gcnew KeyEventArgs(keyData));
return true;
}
else {
return DataGridView::ProcessDialogKey(keyData);
}
}
stdafx.h
#pragma once
stdafx.cpp
#include "stdafx.h"
Thank for the kind helps
Re: Datagridview Class VS 2010 working but not working in VS2015
Re: [RESOLVED] Datagridview Class VS 2010 working but not working in VS2015
Really Thank to god, while we get this Victor & Eric to help the persons like me. My heartiest thanks
Re: [RESOLVED] Datagridview Class VS 2010 working but not working in VS2015