资源简介
C#仿360加速球
http://blog.csdn.net/yuanwofei/article/details/16339825
代码片段和文件信息
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Drawing.Drawing2D;
using System.Diagnostics;
using System.Management;
using System.ComponentModel;
using System.Runtime.InteropServices;
using System.ServiceProcess;
using System.Collections;
using System.Collections.Specialized;
using System.Threading;
namespace AccelerateBall {
public partial class BigForm : Form {
public enum ShowCommands{
HIDE = 1
}
[DllImport(“shell32.dll“)]
static extern IntPtr ShellExecute(IntPtr hwnd string lpOperation string lpFile
string lpParameters string lpDirectory ShowCommands nShowCmd);
[DllImport(“shell32.dll“)]
static extern int SHEmptyRecycleBin(IntPtr handle string root int falgs);
private bool isMouseDown = false;
public bool isMouseEnter = false;
private Point mouseOffset;
private MiniForm miniForm;
public BigForm(MiniForm miniForm) {
Control.CheckForIllegalCrossThreadCalls = false;
InitializeComponent();
this.miniForm = miniForm;
}
#region 按钮不同状态的图标
private void clearBtn_MouseEnter(object sender EventArgs e)
{
clearBtn.Image = new Bitmap(Properties.Resources.over_clear_btn);
}
private void clearBtn_MouseDown(object sender MouseEventArgs e)
{
clearBtn.Image = new Bitmap(Properties.Resources.press_clear_btn);
}
private void clearBtn_MouseLeave(object sender EventArgs e)
{
clearBtn.Image = new Bitmap(Properties.Resources.normal_clear_btn);
}
private void closeBtn_MouseEnter(object sender EventArgs e)
{
closeBtn.Image = new Bitmap(Properties.Resources.close_press);
}
private void closeBtn_MouseLeave(object sender EventArgs e)
{
closeBtn.Image = new Bitmap(Properties.Resources.close_normal);
}
#endregion
#region DetailsPanel和ballControl的鼠标事件
private void DetailsPanel_MouseLeave(object sender EventArgs e)
{
Point p = MousePosition;
if(p.X - 10 <= this.Left || p.X + 10 >= this.Right || p.Y - 10 <= this.Top || p.Y + 10 >= this.Top + this.Height)
{
isMouseEnter = false;
hideDetailsFormTimer.Enabled = true;
}
}
private void DetailsPanel_MouseEnter(object sender EventArgs e)
{
isMouseEnter = true;
miniForm.TopLevel = this.TopLevel;
}
private void DetailsPanel_MouseDown(object sender MouseEventArgs e)
{
if(e.Button == MouseButtons.Left)
{
isMouseDown = true;
mouseOffset = new Point(MousePosition.X - this.Location.X MousePo
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2013-11-15 15:00 仿360加速器\
目录 0 2013-11-15 14:59 仿360加速器\AccelerateBall\
文件 7997 2013-06-14 19:21 仿360加速器\AccelerateBall\AccelerateBall.csproj
文件 523 2013-06-01 19:04 仿360加速器\AccelerateBall\AccelerateBall.csproj.user
文件 17097 2013-06-14 18:46 仿360加速器\AccelerateBall\BigForm.Designer.cs
文件 13722 2013-06-14 18:44 仿360加速器\AccelerateBall\BigForm.cs
文件 6025 2013-06-04 14:45 仿360加速器\AccelerateBall\BigForm.resx
目录 0 2013-11-15 14:59 仿360加速器\AccelerateBall\CustomControl\
文件 1045 2013-05-27 09:37 仿360加速器\AccelerateBall\CustomControl\BigBallControl.Designer.cs
文件 1350 2013-06-04 14:57 仿360加速器\AccelerateBall\CustomControl\BigBallControl.cs
文件 1905 2013-05-20 20:42 仿360加速器\AccelerateBall\CustomControl\MiniBallControl.Designer.cs
文件 2035 2013-05-29 23:19 仿360加速器\AccelerateBall\CustomControl\MiniBallControl.cs
文件 6199 2013-05-19 01:45 仿360加速器\AccelerateBall\CustomControl\MiniBallControl.resx
文件 19601 2013-06-30 11:24 仿360加速器\AccelerateBall\MiniForm.Designer.cs
文件 15541 2013-06-30 11:24 仿360加速器\AccelerateBall\MiniForm.cs
文件 27472 2013-06-30 11:24 仿360加速器\AccelerateBall\MiniForm.resx
目录 0 2013-11-15 14:59 仿360加速器\AccelerateBall\NetworkSpeed\
文件 3423 2013-05-20 17:22 仿360加速器\AccelerateBall\NetworkSpeed\NetworkAdapter.cs
文件 4262 2013-05-20 17:47 仿360加速器\AccelerateBall\NetworkSpeed\NetworkMonitor.cs
文件 441 2013-06-03 16:21 仿360加速器\AccelerateBall\Program.cs
目录 0 2013-11-15 14:59 仿360加速器\AccelerateBall\Properties\
文件 1458 2013-05-19 00:53 仿360加速器\AccelerateBall\Properties\AssemblyInfo.cs
文件 7812 2013-05-29 19:41 仿360加速器\AccelerateBall\Properties\Resources.Designer.cs
文件 9237 2013-05-29 19:41 仿360加速器\AccelerateBall\Properties\Resources.resx
文件 1114 2013-05-27 15:45 仿360加速器\AccelerateBall\Properties\Settings.Designer.cs
文件 249 2013-05-18 23:52 仿360加速器\AccelerateBall\Properties\Settings.settings
文件 2423 2013-06-14 19:17 仿360加速器\AccelerateBall\Properties\app.manifest
目录 0 2013-11-15 14:59 仿360加速器\AccelerateBall\Resources\
文件 3755 2013-05-27 12:37 仿360加速器\AccelerateBall\Resources\ball.png
文件 6978 2013-05-27 13:22 仿360加速器\AccelerateBall\Resources\ball_normal.png
文件 8665 2013-05-27 13:22 仿360加速器\AccelerateBall\Resources\ball_pressed.png
............此处省略46个文件信息
评论
共有 条评论