https://github.com/blizzcrafter/monogame.invisible
Makes your MonoGame window transparent!
https://github.com/blizzcrafter/monogame.invisible
desktop desktop-game game invisible monogame transparent window windows windows-desktop
Last synced: 5 months ago
JSON representation
Makes your MonoGame window transparent!
- Host: GitHub
- URL: https://github.com/blizzcrafter/monogame.invisible
- Owner: BlizzCrafter
- License: other
- Created: 2025-02-09T11:47:58.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-03-02T01:11:33.000Z (over 1 year ago)
- Last Synced: 2025-04-02T10:19:39.668Z (over 1 year ago)
- Topics: desktop, desktop-game, game, invisible, monogame, transparent, window, windows, windows-desktop
- Language: C#
- Homepage:
- Size: 179 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README

# Welcome to MonoGame.Invisible!
[](https://www.nuget.org/packages/MonoGame.Invisible)
MonoGame.Invisible makes your MonoGame window fully transparent!
### Look for yourself:
https://github.com/user-attachments/assets/0cd45914-a175-4d84-8b2e-ff4d6d358aab
Now you can create one of those hyped "**Desktop-Games**" with the **MonoGame.Framework**... if you know what I mean :)
### How To Use It?
Creating an invisible MonoGame window with this library is as easy as:
```c#
protected override void Initialize()
{
// Setup the TransparentWindowManager
TransparentWindowManager.Init(this, graphics);
base.Initialize();
}
protected override void Draw(GameTime gameTime)
{
TransparentWindowManager.Window.PrepareDraw();
spriteBatch.Begin();
// Your Drawings here!
spriteBatch.End();
}
```
EASY! π
### Some Helpful Features:
```c#
protected override void Initialize()
{
// The window will stay in the background - even on user interaction.
TransparentWindowManager.Window.KeepInBackground();
// Keeps the window in the foreground, preventing it from being moved to the back.
TransparentWindowManager.Window.KeepInForeground();
}
protected override void Update(GameTime gameTime)
{
// Ensure window stays in the back.
if (TransparentWindowManager.Window.IsForegroundWindow())
{
TransparentWindowManager.Window.SendToBack();
}
if (TransparentWindowManager.Window.IsPixelOpaque(mousePoint))
{
// The pixel under the mouse cursor is opaque!
}
else
{
// The pixel under the mouse cursor is transparent!
}
}
```
More helpful stuff and features inside! π
> [!NOTE]
> Only works with a **MonoGame.Framework.WindowsDX** project!
> A **MonoGame.Framework.DesktopGL** project **doesn't work** - even if compiled for windows!
> [!TIP]
> Check out the **integrated sample project**, which shows the invisible MonoGame window in action.
> It's much smoother than in the video. You need to see it for yourself!
### π Now Have Fun with MonoGame.Invisible! πΈοΈ
> [!IMPORTANT]
> PS: If you create such a Desktop-Game with MonoGame.Invisible, then please let me know. This is not neccessary, but I would be happy to add a link to your game here on this site! :)