コード例 #1
0
        protected virtual void OnSetCursor(SetCursorEventArgs e)
        {
            var handler = SetCursor;

            if (handler != null)
            {
                handler(this, e);
            }
        }
コード例 #2
0
        private void WmSetCursor(ref Message m)
        {
            var e = new SetCursorEventArgs(
                PointToClient(Cursor.Position),
                (HitTest)(m.LParam.ToInt32() & 0xffff)
                );

            OnSetCursor(e);
            Cursor.Current = e.Cursor ?? Cursor;
        }