EasyImgui is a library that allows you to integrate ImGui, a popular immediate mode graphical user interface, with WinForms applications using the .NET Framework. It provides an overlay that renders over DirectX 9 (DX9), enabling developers to create rich, interactive GUIs for their applications with ease.
- Easy Integration: Seamlessly integrate ImGui with WinForms applications.
- Interactive Overlays: Supports interactive overlays that can be toggled between interactive and non-interactive states.
-
Create a .NET Framework 4.8 Project: Open Visual Studio and create a new Console application targeting .NET Framework 4.8.
-
Install EasyImgui via NuGet:
-
Package Manager Console:
Open the Package Manager Console and run:
Install-Package EasyImGui -Version 1.1.0
-
.NET CLI:
If you prefer using the .NET CLI, run:
dotnet add package EasyImGui --version 1.1.0
-
Visual Studio Package Manager GUI:
- Right-click on your project in the Solution Explorer.
- Select Manage NuGet Packages.
- Search for EasyImGui.
- Install version 1.1.0.
-
-
Clone the Repository:
git clone https://github.com/DestroyerDarkNess/EasyImGui.git
-
Open the Solution:
Open the
EasyImGui.sln
file in Visual Studio. -
Restore NuGet Packages:
- Visual Studio should automatically restore the required NuGet packages.
- If not, right-click on the solution and select Restore NuGet Packages.
-
Build the Project:
Build the solution to compile the EasyImgui library/TestApp.
-
Add Reference:
- In your own project, add a reference to the compiled
EasyImGui.dll
. - Add additional references:
RenderSpy.dll
,Hexa.NET.ImGui.dll
,Hexa.NET.ImGui.Backends.dll
.
- In your own project, add a reference to the compiled
To start using EasyImgui in your application:
-
Import:
using EasyImGui; using EasyImGui.Core; using Hexa.NET.ImGui; using System; using System.Windows.Forms;
-
Copy and Paste example code (External Normal Mode) :
internal class Program { public static Overlay OverlayWindow = null; static void Main(string[] args) { bool result = Diagnostic.RunDiagnostic(); if (result) { Console.WriteLine("All diagnostics passed. The system is ready."); } else { Console.WriteLine("Some diagnostics failed. Please resolve the missing libraries, Press any key to continue."); Console.ReadKey(); } OverlayWindow = new Overlay() { EnableDrag = false, ResizableBorders = true, ShowInTaskbar = true }; OverlayWindow.ImguiManager.ConfigContex += OnConfigContex; OverlayWindow.OnImGuiReady += (object sender, bool Status) => { if (Status) { OverlayWindow.ImguiManager.Render += Render; } else { Console.WriteLine("Unable to initialize Imgui"); } }; try { Application.Run(OverlayWindow); } catch (Exception Ex) { MessageBox.Show(Ex.Message); Environment.Exit(0); } } private static bool OnConfigContex() { OverlayWindow.ImguiManager.IO.ConfigDebugIsDebuggerPresent = false; OverlayWindow.ImguiManager.IO.ConfigErrorRecoveryEnableAssert = false; OverlayWindow.Location = new System.Drawing.Point(0, 0); OverlayWindow.Size = new System.Drawing.Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height); OverlayWindow.Interactive(true); return true; } private static bool Render() { ImGui.ShowDemoWindow(); return true; } }
-
EasyImGui has 2 additional modes for overlaying on applications (InGame and InGameEmbed) if you want to see how to implement it check the complete example: Program.cs
EasyImgui simplifies the implementation and use of imgui, it also provides you with overlay methods for your application.... cheats.....
Key Takeaways:
- Ease of Use: Minimal setup required to get started.
- Customizable: Events and methods allow for extensive customization.
- Interactive Overlays: Easily toggle between interactive and non-interactive states.
This version of EasyImgui uses Hexa.NET.ImGui , credits to JunaMeinhold , Contributions are welcome.