Trouble Creating Custom Mouse Pointer in Board Game...

T

Tom Alcendor

I am building a chess game application that allows a user
to click on a piece and move it to a new square. When the
user clicks on a piece the mouse pointer must change to
the image associated with that square. The squares are
PictureBoxes with images of the pieces set to the pBox's
image property.

I am having trouble with changing the mouse pointer to a
custom mouse pointer during drag and drop operations. I
have checked several articles on Google for a solution.
One article I found stated that a custom Cursor object
must be created and placed in a resource file -- then at
runtime the custom cursor can be assigned to the pBox's
cursor property.

This is a common feature of board games where images are
moved about to show a player's move. If anyone out there
has done this in Visual Basic .Net, please share your
profound knowledge so that I may complete this area of my
application.

Thanks in advance,
Tom Alcendor
(e-mail address removed)
 
M

Mick Doherty

I don't have code, but I believe you can achieve this through the
CreateIconIndirect API call.
 
M

Mick Doherty

In fact scrub that. you just need

Me.Cursor = New Cursor(MyBitmap.GetHicon)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top