登录
首页 » C# » winform 实现鼠标拖放图片, 随鼠标移动的图像实例 附完整源码

winform 实现鼠标拖放图片, 随鼠标移动的图像实例 附完整源码

于 2013-05-07 发布
0 209
下载积分: 1 下载次数: 0

代码说明:

鼠标拖动图片,然后图片随着鼠标移动,放开鼠标后 图片则停留在新位置,如下图效果

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 课程信息VC操作Access数据库(实现增删改查)
    课程信息VC操作数据库,需要将course.mdb 放到 和 exe 同级目录
    2019-12-31下载
    积分:1
  • C# 音合成例子源码(TTS微软库)
    C# 语音合成例子源码(TTS微软库)
    2019-02-25下载
    积分:1
  • C# 酒店数据管理系统(含数据库)源码下载
    酒店管理系统源码 登陆账号密码 均是 admin  客房管理
    2015-03-04下载
    积分:1
  • 多说-社会化评论系统 完整实例源码下载
    多说社会化评论系统 源码
    2014-06-12下载
    积分:1
  • 24点算法游戏
    24点算法游戏
    2019-12-02下载
    积分:1
  • C# 视频聊天源码
    C# 视频聊天源码
    2015-06-01下载
    积分:1
  • c# winform 自定义控件类LayeredSkin.dll
    自定义开关按钮,滚动相册,进度条,窗体控件/******************************************************************** * * * * 使本项目源码或本项目生成的DLL前请仔细阅读以下协议内容,如果你同意以下协议才能使用本项目所有的功能, * * 否则如果你违反了以下协议,有可能陷入法律纠纷和赔偿,作者保留追究法律责任的权利。 * * * * 1、你可以在开发的软件产品中使用和修改本项目的源码和DLL,但是请保留所有相关的版权信息。 * * 2、不能将本项目源码与作者的其他项目整合作为一个单独的软件售卖给他人使用。 * * 3、不能传播本项目的源码和DLL,包括上传到网上、拷贝给他人等方式。 * * 4、以上协议暂时定制,由于还不完善,作者保留以后修改协议的权利。 * * * * Copyright (C) 2013-2014 LayeredSkin Corporation All rights reserved. * * 作者: 小红帽  QQ:761716178 * * 请保留以上版权信息,否则作者将保留追究法律责任。 * * * * 创建时间:2014-04-13 * * 说明:QQ.cs * *********************************************************************/using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using LayeredSkin.Forms;namespace test{    public partial class QQ : LayeredForm    {        public QQ()        {            InitializeComponent();        }        private void layeredButton1_Click(object sender, EventArgs e)        {            this.WindowState = FormWindowState.Minimized;        }        private void QQ_Load(object sender, EventArgs e)        {            this.Animation.Effect = new LayeredSkin.Animations.GradualCurtainEffect() { ChangeHeight = 25 };            yezi = new Bitmap(90, 80);//先把叶子画在稍微大一点的画布上,这样叶子旋转的时候才不会被裁掉一部分            using (Graphics g = Graphics.FromImage(yezi))            {                g.DrawImage(Image.FromFile("Images\yezi3.png"), 10, 0);            }            timer1.Start();        }        private void layeredButton2_Click(object sender, EventArgs e)        {            this.Animation.Effect = new LayeredSkin.Animations.GradualCurtainEffect();            this.Animation.Asc = true;            this.Close();        }        private void FormMoveMouseDown(object sender, MouseEventArgs e)        {            LayeredSkin.NativeMethods.MouseToMoveControl(this.Handle);        }        Image Cloud = Image.FromFile("Images\cloud.png");        float cloudX = 0;        Image yezi;        float angle = 10;        bool RotationDirection = true;//是否为顺时针        protected override void OnLayeredPaint(PaintEventArgs e)        {            Graphics g = e.Graphics;            if (cloudX > this.Width - Cloud.Width)            {//云的飘动                cloudX = 0;            }            else            {                cloudX = 0.5f;            }            g.DrawImage(Cloud, cloudX, 0);//把云绘制上去            if (angle > 10)            {//控制旋转方向                RotationDirection = false;            }            if (angle < -10)            {                RotationDirection = true;            }            if (RotationDirection)            {                angle = 1;            }            else            {                angle -= 1;            }            using (Image temp = LayeredSkin.ImageEffects.RotateImage(yezi, angle, new Point(25, 3)))            {                g.DrawImage(temp, 140, 70);//绘制叶子            }            base.OnLayeredPaint(e);        }        private void timer1_Tick(object sender, EventArgs e)        {            LayeredPaint();            GC.Collect();        }        public bool isShow = false;        bool isFirst = true;        private void layeredButton3_Click(object sender, EventArgs e)        {            isShow = false;            if (isFirst)            {                this.Animation.Effect = new LayeredSkin.Animations.ThreeDTurn();                this.Animation.AnimationEnd = Animation_AnimationEnd;            }            isFirst = false;            this.Animation.Asc = false;            this.Animation.Start();        }        //QQConfig config;        void Animation_AnimationEnd(object sender, LayeredSkin.Animations.AnimationEventArgs e)        {            if (!isShow)            {                this.Hide();                QQConfig config = new QQConfig(this);                config.Location = this.Location;                config.Show();            }        }    }}
    2020-12-11下载
    积分:1
  • DiscUtils读写iso以及虚拟磁盘文件类库源码
    DiscUtils读写iso以及虚拟磁盘文件类库源码
    2015-05-21下载
    积分:1
  • Mvc4+EasyUI建筑材料系统源码
    Mvc4 EasyUI建筑材料系统源码 一、源码描述    这是一款采用了NHibernate MVC4 bootstrap Redis(默认注释掉了选配) T4技术开发的    MVC权限管理系统源码。二、功能介绍    该源码主要包括了菜单管理、权限管理、用户管理、角色管理、部门管理、配置信息的    功能。 三、注意事项    1、管理员用户名密码均是:admin。    2、开发环境为Visual Studio 2012,数据库为SQL Server 2008r2,数据库文件在    DB文件夹中,使用.net 4.0开发。    3、默认数据库连接字符串在webconfig和appconfig配置文件中修改。    4、使用的时候注意修改webconfig和BaseOperator.cs文件中xml的路径,要和本地的    绝对路径保持一致。
    2017-03-21下载
    积分:1
  • wcf 用Duplex实现消息广播 实例源码
    wcf 用Duplex实现消息广播 实例源码
    2015-01-07下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载