How to open a filedialog on Windows?

I’ve been building a bunch of little tools & editors in MonoGame.WindowsDX, is there a way to pop open a filedialog to save/load files? Preferably without importing another entire widget library?

Cheers!

Hi,

the easiest way would be to use Windows forms and its OpenFileDialog.
I’ve been searching for a similar thing for a long time (not related to MonoGame though), but the only way to have such a dialog is using WinForms or creating your own one.
And as these tools are most likely just for you or other developers, using WinForms really isn’t a bad thing as the needed libraries are almost on every Windows machine and they are not bundled with your program.

Regards. :slight_smile:

Unfortunately i don’t think that will work crossplatform, just on windows.

As far as i can tell there is no crossplatform way to really pop open a separate window and manipulate it from game.

Yeah of course, these tools are only for developer use though, I’m not shipping or publishing them. I’ll look into winforms, cheers!

Otherwise, you could look for “Eto.Forms” by Picoe, it’s a cross-platform solution.

1 Like