C#如何让图像跟随表单外的光标 [英] C# how to have an image follow cursor outside the form

查看:70
本文介绍了C#如何让图像跟随表单外的光标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何做到这一点,有一个图像,比如说我在一个图片框中有一个图像,该图像显示在光标的顶端,就像我要将图像放到桌面.例如,在Windows 7计算机上,您可以将图像从文件夹拖动到桌面,并且在拖动图像时,它将在光标的顶端显示图像.我想知道如何做到这一点,我主要是想知道它叫什么,所以我可以对其进行研究.我打算做的是,执行此拖放操作,然后使操作发生,我想知道是否有人可以帮助我找到此名称,或者帮助我编写代码或对此进行一些补充?谢谢

I was wondering how to do this, have an image, let''s say an Image that I have in a picture box, have that image display on the tip of the cursor looking like I am going to drop the image onto the desktop. For example, on your windows 7 computer you can drag an image from your folder to your desktop and it will show a image on the tip of your cursor while your dragging the image. I was wondering how I can do this, I mostly want to know what it is called so I can research it. And what I plan on doing this is, I do this drag and drop action and I can make an action occur, I was wondering if anyone can help me find the name of this or help me with code or some reaseach of this? thank you

推荐答案

以下是拖放的WPF代码:
http://blogs.msdn.com/b/llobo/archive/2008/02/26/drag-drop-library-updated.aspx [ http://stackoverflow.com/questions/3240603/c-sharp-drag-and-drop-show-the-draged-item-with-dragging [
Here is WPF code for drag and drop:
http://blogs.msdn.com/b/llobo/archive/2008/02/26/drag-drop-library-updated.aspx[^]

here another one:
http://stackoverflow.com/questions/3240603/c-sharp-drag-and-drop-show-the-dragged-item-while-dragging[^]


这篇关于C#如何让图像跟随表单外的光标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆