-
April 14th, 2018, 01:18 PM
#1
[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
-
April 14th, 2018, 02:34 PM
#2
Re: Datagridview Class VS 2010 working but not working in VS2015
Victor Nijegorodov
-
April 15th, 2018, 11:52 AM
#3
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
-
April 15th, 2018, 12:24 PM
#4
Re: [RESOLVED] Datagridview Class VS 2010 working but not working in VS2015
You are welcome!
Victor Nijegorodov
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|