PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework Forms
Drag'n'Drop with Animation
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework Forms
Drag'n'Drop with Animation
![]() |
Drag'n'Drop with Animation |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
I've mastered basic drag'n'drop, but I want to display more than just a
simple cursor when dragging an object, I also want to display a semi-transparent representation of what I'm actually dragging as I move the mouse, which in my case will be some text in a box with a fill image, but it equally could be anything. Anyone know how to achieve this? |
|
|
|
#2 |
|
Guest
Posts: n/a
|
On Fri, 10 Feb 2006 10:47:23 -0000, JezB wrote:
> I've mastered basic drag'n'drop, but I want to display more than just a > simple cursor when dragging an object, I also want to display a > semi-transparent representation of what I'm actually dragging as I move the > mouse, which in my case will be some text in a box with a fill image, but it > equally could be anything. > > Anyone know how to achieve this? I've never done that myself but i suppose that one solution would be to create a Bitmap containg whatever you want to display as the mouse pointer and set your cursor to be that Bitmap whenever you start dragging: this.Cursor = new Cursor(cursorBitmap.GetHicon()); It only works with B&W bitmap though (transparency is supported) and the cursor hot spot is always located at the center of your bitmap so you need to take that into account when creating it. If you want to do fancier things, you'll have to look at the CreateCursor API instead. |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

