I am trying to create a simple record storage application but for some idiotic reason C++ is refusing to let me navigate back to my default frmview.h Form, after adding the record.
This is the code that I am trying to execute:
System::Windows::Forms::DialogResult Result = MessageBox::Show(this,String::Format("Record Added for user {0}, Add another?", txtstaffname),"title", MessageBoxButtons::YesNo, MessageBoxIcon::Information);
if(System::Windows::Forms::DialogResult::Yes == Result)
{
//Do something
}
else
{
this->Close;
frmview::Show;
}
When I try to execute the debugger I get the following exception:
11 IntelliSense: a pointer-to-member is not valid for a managed class $PROJECTDIR$\frmnew.h 444 12 Application1
Now the form that I am trying to go back to is the View Records Form which is also used to go the the current Add Records (frmnew.h) Form and I have included the following headers on both Forms:
frmview.h (View Records):
#include "frmadd.h"
#include "frmedit.h"
frmadd.h (Add Records):
#include "frmview.h"
My computer system is running Windows 8.1 and I have Visual Studio 2012 installed (.NET 4.5)
If it were up to me I would use C# or VB.NET but as part of our assignment we have to use C++.
Any help would be great, thanks.