I have been trying for a while to get this fixed but I haven't seen any solutions online on this topic yet.
The problem is when using MonoGame with the Platform DesktopGL, the Window.Handle seems invalid. As attempting to get a Window/Form from this Handle returns null, further supporting this would be BASS.Net Not being able to play audio on this Window Handle,
Here's part of my code that's attempting to use the Handle (Uses Bass.Net for Audio Playback):
protected override void Initialize() {
Game = this;
//Getting the Form from Window Handle
Form = (Form)Control.FromHandle(Game.Window.Handle);
//Initializing Bass with Window Handle
Bass.BASS_Init(-1, 4100, BASSInit.BASS_DEVICE_DEFAULT, Game.Window.Handle, null);
base.Initlialize()
}
I have tried to look everywhere online, 1 source stating that the MonoGame platform WindowsDX apperantly returns a valid Form, though from what ive noticed in the never versions of MonoGame this platform doesn't seem to be supported anymore, furthermore I would love to have this Project be Cross-Platform so sticking with WindowsDX even if it were to exist/work wouldn't be a good solution I think.
Thanks In advance to anyone who manages to find as to why MonoGame doesn't return me a Window and or why this Particular Piece of code doesn't work.
"Window.Handle" is only valid on WindowsDX platform.
OpenGL, no matter the platform(including Windows), can satisfy this request.
If you are looking for a cross platform solution, look elsewhere.