Custom cursors not visible - any ideas??

perps

Member
Joined
Sep 8, 2005
Messages
14
Programming Experience
Beginner
Greetings to all.

I'm building a MSPaint style simple paint program, and i'm trying to implement custom cursors for the different drawing modes (line, square, fill etc). Problem is, any custom cursor i create and then assign for a particular control (in this case a picture box, which is acting as my drawing canvas) is not visible. I have made sure to make the created custom cursor as an embedded resource, and I know that the code that is calling for the cursor is ok, as the call is made and the cursor changes from the regular pointer to an invisible one. The invisible cursor still functions as normal, i.e. I am still able to draw on the canvas with it etc.

Any ideas on this one?? I've been trawling the web with little success and was hoping that some learned individual on this forum might know the score.

Thanks in advance,

- perps.
 
Hey Kulrom, thanks once again for helping me.

Here's the code...

VB.NET:
Private Sub picMain_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles picMain.MouseMove

SetCursor()

.
.
.

    Private Sub SetCursor()
        Select Case drawMode
            Case 1
                Dim freeDrawCursor = New Cursor(Me.GetType(), "freeDraw.cur")

                picMain.Cursor = freeDrawCursor
                'mainPanel.Cursor = penCursor

        End Select

The SetCursor sub is called on the mouse_move sub for picMain (which is a picture box). Any ideas??

Thanks again,

- perps
 
Back
Top