467,923 Members | 1,142 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,923 developers. It's quick & easy.

Trouble Creating Custom Mouse Pointer in Board Game...

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
ta*******@netscape.net

Jul 21 '05 #1
  • viewed: 4307
Share:
2 Replies
I don't have code, but I believe you can achieve this through the
CreateIconIndirect API call.

"Tom Alcendor" <ta*******@netscape.net> wrote in message
news:43****************************@phx.gbl...
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
ta*******@netscape.net

Jul 21 '05 #2
In fact scrub that. you just need

Me.Cursor = New Cursor(MyBitmap.GetHicon)

"Mick Doherty" <md*******@nospam.ntlworld.com> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl...
I don't have code, but I believe you can achieve this through the
CreateIconIndirect API call.

"Tom Alcendor" <ta*******@netscape.net> wrote in message
news:43****************************@phx.gbl...
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
ta*******@netscape.net


Jul 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Gonzalo Aguirre | last post: by
2 posts views Thread by ck388 | last post: by
2 posts views Thread by apec | last post: by
31 posts views Thread by JoeC | last post: by
10 posts views Thread by sam_cit | last post: by
1 post views Thread by enp | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.