Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello everyone

Can someone please show me how to change the mouse icon. I have 2 PNG files 1 is for dragging (OnMouseDown Handler) and the other is the default pointer.

Found this and it has an error, don't know how to fix this
VB
Dim memory_stream As New System.IO.MemoryStream(My.Resources.open)
Me.Cursor = New Cursor(memory_stream)

ERROR:
VB
Error	1	Overload resolution failed because no accessible New can be called with these arguments:
    Public Sub New(buffer() As Byte): 'Value of type System.Drawing.Bitmap cannot be converted to '1-dimensional array of Byte'.
    Public Sub New(capacity As Integer)': Value of type 'System.Drawing.Bitmap' cannot be converted to 'Integer'.

Thanks
Posted
Updated 28-May-14 2:06am
v2
Comments
E.F. Nijboer 28-May-14 11:14am    
Maybe this article helps you out:
http://www.codeproject.com/Articles/33789/Custom-Mouse-Cursors-VB-NET

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900