• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 201
  • Last Modified:

Mouse icon problem

hi experts

i making some drag and drop in my form and i am changing icon of
mouse during this process with this code
 
Dim MyCursor As Object
MyCursor = New Cursor("c:\Office CD.ico")
Me.Cursor = MyCursor

but i not figure it out to switchback to window normal cursor after drop operation

''' in another way in vb 6 there is very easy to deal with drag and drop mouse icon
while drag and drop event you just called dragicon method but how to deal this
in .net ??

any one give me some hint ??



0
vsvb
Asked:
vsvb
  • 6
  • 3
1 Solution
 
RonaldBiemansCommented:
       Me.Cursor = Cursors.Default
0
 
RonaldBiemansCommented:
also don't load it as object but as a cursor

like

        Dim x As new Cursor(("c:\Office CD.ico")
       me.cursor = x

0
 
RonaldBiemansCommented:
The cursors enumeration holds a lot of predefined type, use the intellisense to view them all :-)
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
RonaldBiemansCommented:
I meant the cursors class, not enumeration ofcourse :-)
0
 
vsvbAuthor Commented:
hi RonaldBiemans

thanks it works Cursor class but can you tell me in this situation i need drag image also in treeview with cursor icon
same as VB 6.0 when you drag and drop some item cursor and dragimage you see both to gather

how to i make it possible in .Net ??

0
 
RonaldBiemansCommented:
Sorry, had a day off yesterday, So you want to see the dragged image aswell as the mouse cursor, am I correct ?
0
 
vsvbAuthor Commented:
ya  exectly
0
 
RonaldBiemansCommented:
I'm afraid that isn't really possible unless you write your own drag drop functionality. I've tried it myself and was not able to get it to work, because when in DoDragDrop mode you cannot seem to get the correct x/y coordinates to move the picture
0
 
vsvbAuthor Commented:
ya i facing same issue ..but i solved it some another way tx for previous answer
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 6
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now