public void SetCursor(Bitmap cursor, Point hotPoint)
        {
            int hotX = hotPoint.X;
            int hotY = hotPoint.Y;
            Bitmap myNewCursor = new Bitmap(cursor.Width *2 - hotX, cursor.Height*2 - hotY);
            Graphics g = Graphics.FromImage(myNewCursor);
            g.Clear(Color.FromArgb(0, 0, 0, 0));
            g.DrawImage(cursor, cursor.Width - hotX, cursor.Height - hotY, cursor.Width,
            cursor.Height);            this.Cursor = new Cursor(myNewCursor.GetHicon());
        
            g.Dispose();
            myNewCursor.Dispose();
        }

解决方案 »

  1.   

    Quote: 引用 1 楼 jiangjrh 的回复:

    自己把箭头也画下去!!![/quote     怎么话  求 介绍- -
      

  2.   


     public void SetCursor(Bitmap cursor, Point hotPoint)
             {
                 int hotX = hotPoint.X;
                 int hotY = hotPoint.Y;
                 Bitmap myNewCursor = new Bitmap(cursor.Width *2 - hotX, cursor.Height*2 - hotY);
                 Graphics g = Graphics.FromImage(myNewCursor);
                 g.Clear(Color.FromArgb(0, 0, 0, 0));
                 g.DrawImage(cursor, cursor.Width - hotX, cursor.Height - hotY, cursor.Width,
                 cursor.Height);
     
                 g.DrawIcon("箭头.ico",0,0,16,16); //在这儿画一个箭头,各参数根据你实际的改 //或g.DrawImage(...);
                this.Cursor = new Cursor(myNewCursor.GetHicon());
             
                 g.Dispose();
                 myNewCursor.Dispose();
             } 
      

  3.   

     public void SetCursor(Bitmap cursor, Point hotPoint)
            {
                int hotX = hotPoint.X;
                int hotY = hotPoint.Y;
                Bitmap myNewCursor = new Bitmap(cursor.Width *2 - hotX, cursor.Height*2 - hotY);
                Graphics g = Graphics.FromImage(myNewCursor);
                g.Clear(Color.FromArgb(0, 0, 0, 0));
                g.DrawImage(cursor, cursor.Width - hotX, cursor.Height - hotY, cursor.Width,
                cursor.Height);            Cursor cur = new Cursor(myNewCursor.GetHicon());
                this.Cursor.Draw(g, ...);
                this.Cursor = cur;
            
                g.Dispose();
                myNewCursor.Dispose();
            }