error C3379: 'Form1::Form2:: DoubleBufferPanel' : a nested class cannot have an assembly access specifier as part of its declaration
Move the DoubleBufferPanel class outside your Form class i.e.
#pragma once
namespace Form1 { // <- You might have another namespace here
// the usual 'using ...' stuff follows
using namespace System;
// etc ...
// Next your new class ...
public ref class DoubleBufferPanel : public Panel
{
public:
DoubleBufferPanel(void)
{
this->SetStyle(ControlStyles::DoubleBuffer
| ControlStyles::UserPaint
| ControlStyles::AllPaintingInWmPaint,
true);
this->SetStyle(ControlStyles::DoubleBuffer, true);
this->UpdateStyles();
}
};
// Followed by the original code ...
public ref class Form1 : public System::Windows::Forms::Form
...
Reputation Points: 1105
Solved Threads: 389
Posting Virtuoso
Offline 1,713 posts
since Nov 2007