From 9a9ec274d32b78291c9ca489a0cc7ce45e85907e Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 4 Feb 2017 13:59:31 -0500 Subject: Sorta-working custom cursors. --- ShiftOS.WinForms/Tools/ControlManager.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'ShiftOS.WinForms/Tools/ControlManager.cs') 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 = ""; -- cgit v1.2.3