diff options
| author | Michael <[email protected]> | 2017-02-04 13:59:31 -0500 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-02-04 13:59:31 -0500 |
| commit | 9a9ec274d32b78291c9ca489a0cc7ce45e85907e (patch) | |
| tree | 89e2c59096a6392813c5bef86ce47e710203f5ef /ShiftOS.WinForms/Tools/ControlManager.cs | |
| parent | 50971ea04e7ad7a7ae9dcbbe911b7b8bcf5dd7d3 (diff) | |
| download | shiftos_thereturn-9a9ec274d32b78291c9ca489a0cc7ce45e85907e.tar.gz shiftos_thereturn-9a9ec274d32b78291c9ca489a0cc7ce45e85907e.tar.bz2 shiftos_thereturn-9a9ec274d32b78291c9ca489a0cc7ce45e85907e.zip | |
Sorta-working custom cursors.
Diffstat (limited to 'ShiftOS.WinForms/Tools/ControlManager.cs')
| -rw-r--r-- | ShiftOS.WinForms/Tools/ControlManager.cs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/ShiftOS.WinForms/Tools/ControlManager.cs b/ShiftOS.WinForms/Tools/ControlManager.cs index 78d3534..8eba773 100644 --- a/ShiftOS.WinForms/Tools/ControlManager.cs +++ b/ShiftOS.WinForms/Tools/ControlManager.cs @@ -138,8 +138,16 @@ namespace ShiftOS.WinForms.Tools public static void SetupControl(Control ctrl) { - + var mouse = SkinEngine.GetImage("mouse"); + if (mouse == null) + mouse = Properties.Resources.DefaultMouse; + + var mBmp = new Bitmap(mouse); + var gfx = Graphics.FromImage(mBmp); + var handle = mBmp.GetHicon(); + + ctrl.Cursor = new Cursor(handle); if (!(ctrl is MenuStrip) && !(ctrl is ToolStrip) && !(ctrl is StatusStrip) && !(ctrl is ContextMenuStrip)) { string tag = ""; |
