资源简介
c# 悬浮窗口 带提示框提示 可拖动 类似于迅雷
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
//#############拖动窗体#############
private bool isMouseDown = false;
private Point FormLocation; //form的location
private Point mouseOffset; //鼠标的按下位置
//#############################
private void button1_Click(object sender EventArgs e)
{
this.Close();
}
private void button1_MouseMove(object sender MouseEventArgs e)
{
}
private void Form1_Load(object sender EventArgs e)
{
this.toolTip1.Active = true;
this.toolTip1.AutomaticDelay = 1000;
this.toolTip1.AutoPopDelay = 20000;
this.toolTip1.InitialDelay = 100;
this.toolTip1.ReshowDelay = 100;
this.toolTip1.BackColor = Color.LightYellow;
this.toolTip1.ForeColor = Color.Salmon;
this.toolTip1.IsBalloon = true;
this.toolTip1.ShowAlways = false;
this.toolTip1.StripAmpersands = false;
this.toolTip1.ToolTipIcon = ToolTipIcon.Info;
this.toolTip1.ToolTiptitle = “温馨提示“;
this.toolTip1.UseAnimation = true;
this.toolTip1.UseFading = true;
this.toolTip1.SetToolTip(this.button1 “ 退出程序“);
this.toolTip1.SetToolTip(this.button2 “ 英文听写“);
}
private void button2_Click(object sender EventArgs e)
{
}
private void button2_MouseDown(object sender MouseEventArgs e)
{
}
private void Form1_MouseDown(object sender MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
isMouseDown = true;
FormLocation = this.Location;
mouseOffset = Control.MousePosition;
}
}
private void Form1_MouseUp(object sender MouseEventArgs e)
{
isMouseDown = false;
}
private void Form1_MouseMove(object sender MouseEventArgs e)
{
int _x = 0;
int _y = 0;
if (isMouseDown)
{
Point pt = Control.MousePosition;
_x = mouseOffset.X - pt.X;
_y = mouseOffset.Y - pt.Y;
this.Location = new Point(FormLocation.X - _x FormLocation.Y - _y);
}
}
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 172032 2011-06-04 11:43 WindowsFormsApplication2\WindowsFormsApplication2\bin\Debug\WindowsFormsApplication2.exe
文件 26112 2011-06-04 11:43 WindowsFormsApplication2\WindowsFormsApplication2\bin\Debug\WindowsFormsApplication2.pdb
文件 11600 2011-06-04 11:10 WindowsFormsApplication2\WindowsFormsApplication2\bin\Debug\WindowsFormsApplication2.vshost.exe
文件 490 2010-03-17 22:39 WindowsFormsApplication2\WindowsFormsApplication2\bin\Debug\WindowsFormsApplication2.vshost.exe.manifest
文件 2877 2011-06-04 11:46 WindowsFormsApplication2\WindowsFormsApplication2\Form1.cs
文件 5193 2011-06-04 11:46 WindowsFormsApplication2\WindowsFormsApplication2\Form1.Designer.cs
文件 246750 2011-06-04 11:46 WindowsFormsApplication2\WindowsFormsApplication2\Form1.resx
文件 2152 2011-06-04 10:25 WindowsFormsApplication2\WindowsFormsApplication2\obj\x86\Debug\DesignTimeResolveAssemblyReferences.cache
文件 6265 2011-06-04 11:43 WindowsFormsApplication2\WindowsFormsApplication2\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache
文件 512 2011-06-04 11:43 WindowsFormsApplication2\WindowsFormsApplication2\obj\x86\Debug\GenerateResource.read.1.tlog
文件 1920 2011-06-04 11:43 WindowsFormsApplication2\WindowsFormsApplication2\obj\x86\Debug\GenerateResource.write.1.tlog
文件 934 2011-06-04 11:30 WindowsFormsApplication2\WindowsFormsApplication2\obj\x86\Debug\WindowsFormsApplication2.csproj.FileListAbsolute.txt
文件 172032 2011-06-04 11:43 WindowsFormsApplication2\WindowsFormsApplication2\obj\x86\Debug\WindowsFormsApplication2.exe
文件 160972 2011-06-04 11:43 WindowsFormsApplication2\WindowsFormsApplication2\obj\x86\Debug\WindowsFormsApplication2.Form1.resources
文件 26112 2011-06-04 11:43 WindowsFormsApplication2\WindowsFormsApplication2\obj\x86\Debug\WindowsFormsApplication2.pdb
文件 180 2011-06-04 11:15 WindowsFormsApplication2\WindowsFormsApplication2\obj\x86\Debug\WindowsFormsApplication2.Properties.Resources.resources
文件 505 2011-06-04 11:09 WindowsFormsApplication2\WindowsFormsApplication2\Program.cs
文件 1404 2011-06-04 10:25 WindowsFormsApplication2\WindowsFormsApplication2\Properties\AssemblyInfo.cs
文件 2898 2011-06-04 10:25 WindowsFormsApplication2\WindowsFormsApplication2\Properties\Resources.Designer.cs
文件 5612 2011-06-04 10:25 WindowsFormsApplication2\WindowsFormsApplication2\Properties\Resources.resx
文件 1109 2011-06-04 10:25 WindowsFormsApplication2\WindowsFormsApplication2\Properties\Settings.Designer.cs
文件 249 2011-06-04 10:25 WindowsFormsApplication2\WindowsFormsApplication2\Properties\Settings.settings
文件 3707 2011-06-04 11:15 WindowsFormsApplication2\WindowsFormsApplication2\WindowsFormsApplication2.csproj
文件 914 2011-06-04 10:26 WindowsFormsApplication2\WindowsFormsApplication2.sln
..A..H. 20992 2011-06-04 11:46 WindowsFormsApplication2\WindowsFormsApplication2.suo
目录 0 2011-06-04 10:25 WindowsFormsApplication2\WindowsFormsApplication2\obj\x86\Debug\TempPE
目录 0 2011-06-04 11:43 WindowsFormsApplication2\WindowsFormsApplication2\obj\x86\Debug
目录 0 2011-06-04 10:26 WindowsFormsApplication2\WindowsFormsApplication2\bin\Debug
目录 0 2011-06-04 11:05 WindowsFormsApplication2\WindowsFormsApplication2\bin\Release
目录 0 2011-06-04 10:25 WindowsFormsApplication2\WindowsFormsApplication2\obj\x86
............此处省略8个文件信息
- 上一篇:C#一机一码注册方式演示样例
- 下一篇:c#版flappybird
相关资源
- C# 调用win32 api函数-user32.dll详细说明
- C# 调用BarTender打印条码DEMO
- 大型比赛竞赛抽签系统 可打印 c# vs
- C#编写的Gerber查看器
- lua C# .Net4.0 vs2010 LuaInterface
- C#十六进制编辑器
- 明华URF-35H读卡器 C#读写源码 为大家
- C#文件流读取CSV文件
- c#读写PDF文件sql
- C# winform Socket大文件传输
- c#车牌识别系统附30张测试图片
- 《C#面向对象程序设计》源代码(CS)
- 金旭亮《C#面向对象程序设计》教案
- 试题库管理系统毕业论文(C#)源程序
- 学校网站原代码(C#.NET)
- C#-数据库操作技术-员工管理系统
- c#web开发入门经典
- C#与Matlab混合编程的几种方式
- c# 开发与 mysql数据库实现的增删改查
- C#异步操作 异步查询数据库 异步处理
- Basler相机通过IO触发源码
- [源代码] 《领域驱动设计 (C# 2008 实
- 松下PLC与C#通讯串口调试入门教程.z
- USB 继电器控制器 LCUS-1 保证能用 c#
- C# AES加密解密小工具
- C#圆形按钮,非常漂亮动态~~
- [精]C#仿QQ右下角弹出提示框()
- C#进程间通信-共享内存代码
- 有史以来最简单的三层(C#)
- vb调用c#编写的串口DLL文件(vb源码
评论
共有 条评论