Edit: I using Mongame 3.4 and Visual Studio 2013 Community
I used this tutorial.
http://jaquadro.com/2013/03/bringing-your-xna-winforms-controls-to-monogame-opengl/
Here is what I get when I run the project when I’m trying to use my “ControlScene” Control.
graphicsDevice = new GraphicsDevice(adapter,profile,pp) is what gets highlighted(Code can be seen in tutorial link I posted).
Managed Debugging Assistant ‘FatalExecutionEngineError’ has detected a problem in ‘C:\Users\nicho\Documents\Visual Studio 2013\Projects\Lycan2DEditor\Lycan2DEditor\bin\Release\Lycan2DEditor.vshost.exe’.
Additional information: The runtime has encountered a fatal error. The address of the error was at 0x70c387f0, on thread 0x1ed4. The error code is 0xc0000005. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack.
Control Scene Code
public partial class ControlScene : GraphicsDeviceControl
{
public ControlScene()
{
InitializeComponent();
}
protected override void Initialize()
{
}
protected override void Draw()
{
}
}
Thanks.