MonoGame.Forms - Create your Editor Environment!

Hello @harry-cpp where is full source . I don’t see where is link. You mean Post: 118

But It looks only github’s issue.

// EDIT You are right.

How do I add renderWindow? Why do you call RenderWindow? What does it mean? I thought you add Gtk Button like I saw your picture. How did you? I want know. Why do you say my net framework horrible? But It is as “Area” not “Window”.

MonoGame.Forms 2.1.0 - Audio Support

  • Now updating the FrameworkDispatcher to enable Audio in MonoGame.Forms [DX; GL].
  • Create SoundEffects, SoundEffectInstances and Songs, and play them using the MonoGame.Framework.
  • RenderTargets created with the RenderTargetManager are now enabled on creation, so they are becoming available without the need of resizing a control first [DX].

I remembering that someone here wanted to create a GameBoy Emulator with MonoGame.Forms. This audio update should be very useful :wink:

You could also create a MediaPlayer now or load and preview audio fles in your editor.

Happy Coding! :smiley:

And where is other method by @harry-cpp ?

I wait longer 2 months …

I will take a closer look when the PR got merged.

Further I need to implement it differently, because MonoGame.Forms does not make use of the game class.

I’m also busy with a different project, which I will reveal soon.

Thanks for understanding.

I’m having an issue where whenever I move my mouse over a DrawWindow in my project, the scroll bar for the form containing it automatically resets. I was able to find that somebody on stackoverflow had the same issue but the thread was deleted. Is this a common issue with an easy solution?

Do you placed the DrawWindow control on a Panel with scroll bars enabled?

Because normally you wouldn’t have scroll bars on a MonoGame.Forms control.

Yeah, the DrawWindow is inside a smaller panel, which is what’s being scrolled around.

I’ve not tested this with MonoGame.Forms but i’m pretty sure it’s a bug in WindowsForms.

I once had a simular issue with a different library and scrollable panels.

You can fix this issue by creating your own Panel class like this:

public class PanelNoScrollOnFocus : Panel
{
    protected override System.Drawing.Point ScrollToControl(Control activeControl)
    {
        return DisplayRectangle.Location;
    }
}

And place the MonoGame.Forms control onto this new Panel.

I hope this also fixes your issue.

Yup, that works. Thank you!

1 Like

Created an issue for it together with the solution to inform other users:

Test: MonoGame.Framework + Libretro + MonoGame.Forms


In my last post I talked about the guy who wanted to create a GameBoy Emulator with MonoGame.Forms and - coincidentally (hacked my SNES MINI and installed RetroArch on it) - I just played around a little - literally:

There are no P/Invokes for embding a window of a different emulator application or such tricks; an original Super Mario World.sfc rom was natively loaded using the snes9x_libretro.dll core.

Using the LibretroAPI it was possible to get the Framebuffer and process this data to a Texture2D which I then draw using the SpriteBatch of MonoGame.

I also converted the GamePadState to be used with Libretro, so that I can use my Xbox360 gamepad to control the SNES rom.

With Libretro it’s also possible to load different cores such as for a GameBoy, Playstation and so on, so that it would become possible to create an application like RetroArch.

RetroArch is - by the way - the official frontend of Libretro. With that in mind MonoGame would be the frontend of Libretro using a c# wrapper of Libretro. You can find one here (the one which inspired me).

I just thought to share this with you because it’s interesting and fun, isn’t it? :wink:

3 Likes

I tried the demo latest version from github. but why it’s flickering? (Solved with latest version)

Hey @11110 and thanks for reporting this issue!

Fortunately this bug was only in the test project of MonoGame.Forms and I already fixed it.

Just download the new version from GitHub and you are good to go.

All the NuGet packages and the core libraries are still working as before.

Cheers! :slight_smile:

PS: Can you please delete the flickering image from your last post? Because some people have problems with seeing flickering images. This would be very polite :wink: Thank you very much!

2 Likes

Thanks for update :slight_smile:

1 Like

anyway to increase draw interval in directx? current is only 60fps

There is no built-in solution.

Currently the game loop of MonoGame.Forms is simply attached to the Application.Idle event (See explanation on StackOverflow).

will it possible to have built-in interval control in the future?

There is a built-in intervall for the OpenGL version. But even if you set it to 1ms the fps are around 60fps.

It would be the same for the WindowsDX version of the library, because the content already renders as soon as the application enters the idle state. This at least leads to a smooth editing experience.

But i’m always open to see different approaches, when they are practical enough.

But without it, it will be hard to measure the potential framerate. Is there any other option without using idle state

Hello Sir sqrMin1^_^y may I ask how do you set GraphicsProfile to HiDef when in winform where there is no Game instance and can’t create a GameDeviceManager ?