一个漂亮的毫秒级秒表,功能是:
1. 毫秒级精确,timer触发,系统时间计时,绝对比timer的触发累计计时精确
3. 快捷键设置,在程序没有取得焦点的时候仍然可以用快捷键使用
4. 基本功能:开始计时,记录时间点,暂停,归零,复制或删除记录的时间点
5. 所有按钮均为漂亮的图片,包括程序图标
注:这是整个工程文件,包括所有的图片,文件夹中有程序截图
我是用VS2010编的,低版本的应该也可以使用。
代码片段和文件信息
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 238142 2010-11-12 16:12 TimerFinalIcon.ico
文件 21267 2010-11-15 19:48 Timerpause3.PNG
文件 22289 2010-11-15 19:47 Timerplay3.PNG
文件 16601 2010-11-15 19:46 Timer
ecord3.PNG
文件 21486 2010-11-15 19:48 Timerstop3.PNG
文件 836096 2010-11-15 20:50 TimerTimerinDebugEasy Timer.exe
文件 30208 2010-11-15 20:50 TimerTimerinDebugEasy Timer.pdb
文件 11600 2010-11-15 20:45 TimerTimerinDebugEasy Timer.vshost.exe
文件 490 2010-03-17 22:39 TimerTimerinDebugTimer.vshost.exe.manifest
文件 238142 2010-11-12 16:13 TimerTimerFinalIcon.ico
文件 6728 2010-11-15 20:50 TimerTimerForm1.cs
文件 7327 2010-11-15 20:50 TimerTimerForm1.Designer.cs
文件 363727 2010-11-15 20:50 TimerTimerForm1.resx
文件 8403 2010-11-15 16:51 TimerTimerobjx86DebugDesignTimeResolveAssemblyReferences.cache
文件 6663 2010-11-15 20:50 TimerTimerobjx86DebugDesignTimeResolveAssemblyReferencesInput.cache
文件 836096 2010-11-15 20:50 TimerTimerobjx86DebugEasy Timer.exe
文件 30208 2010-11-15 20:50 TimerTimerobjx86DebugEasy Timer.pdb
文件 2132 2010-11-15 20:50 TimerTimerobjx86DebugGenerateResource.read.1.tlog
文件 838 2010-11-15 20:50 TimerTimerobjx86DebugGenerateResource.write.1.tlog
文件 8031 2010-11-15 13:17 TimerTimerobjx86DebugResolveAssemblyReference.cache
文件 5632 2010-11-15 19:49 TimerTimerobjx86DebugTempPEProperties.Resources.Designer.cs.dll
文件 651 2010-11-15 20:50 TimerTimerobjx86DebugTimer.csproj.FileListAbsolute.txt
文件 238708 2010-11-15 20:50 TimerTimerobjx86DebugTimer.Form1.resources
文件 344807 2010-11-15 20:50 TimerTimerobjx86DebugTimer.Properties.Resources.resources
文件 499 2010-11-14 19:40 TimerTimerProgram.cs
文件 1440 2010-11-12 15:09 TimerTimerPropertiesAssemblyInfo.cs
文件 586 2010-11-15 16:26 TimerTimerPropertiesDataSourcesTimeRecord.datasource
文件 5581 2010-11-15 19:49 TimerTimerPropertiesResources.Designer.cs
文件 8605 2010-11-15 19:49 TimerTimerPropertiesResources.resx
文件 1088 2010-11-12 15:09 TimerTimerPropertiesSettings.Designer.cs
............此处省略32个文件信息
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;
using System.Runtime.InteropServices;
namespace Timer
{
public partial class Form1 : Form
{
private DateTime StartTime;
private TimeSpan TimePauseSpan;
private bool IsMinimized = false;
private bool IsPaused = false;
private List Records = new List();
const int WM_HOTKEY = 0x312;
private enum MyKeys
{
None = 0
Alt = 1
Ctrl = 2
Shift = 4
Win = 8
}
[DllImportAttribute(“user32.dll“ EntryPoint = “RegisterHotKey“)]
public static extern bool RegisterHotKey
(
IntPtr hWnd //要注册热键的窗口句柄
int id //热键编号
int fsModifiers //特殊键如:Ctrl,Alt,Shift,Window
int vk //一般键如:A B C F1,F2 等
);
[DllImportAttribute(“user32.dll“ EntryPoint = “UnregisterHotKey“)]
public static extern bool UnregisterHotKey
(
IntPtr hWnd //注册热键的窗口句柄
int id //热键编号上面注册热键的编号
);
public Form1()
{
InitializeComponent();
this.StartPosition = FormStartPosition.CenterScreen; //Shown in the center of the screen
this.timer1.Enabled = false;
this.timer1.Interval = 1;
RegisterHotKey(this.Handle 200 (int)MyKeys.Alt (int)Keys.Oemtilde); //注册热键Alt+‘
RegisterHotKey(this.Handle 201 (int)MyKeys.Alt (int)Keys.D1); //注册热键Alt+1
RegisterHotKey(this.Handle 202 (int)MyKeys.Alt (int)Keys.D2); //注册热键Alt+2
RegisterHotKey(this.Handle 203 (int)MyKeys.Alt (int)Keys.Q); //注册热键Alt+A
}
protected override void OnClosing(CancelEventArgs e)
{
UnregisterHotKey(this.Handle 200);
UnregisterHotKey(this.Handle 201);
UnregisterHotKey(this.Handle 202);
UnregisterHotKey(this.Handle 203);
base.OnClosing(e);
}
protected override void WndProc(ref Message m)
{
if (m.Msg == WM_HOTKEY)
{
switch (m.WParam.ToInt32())
{
case 200:
PlayButton_Click(null null);
break;
case 201:
PauseButton_Click(null null);
break;
case 202:
StopButton_Click(null null);
break;
case 203:
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 238142 2010-11-12 16:12 TimerFinalIcon.ico
文件 21267 2010-11-15 19:48 Timerpause3.PNG
文件 22289 2010-11-15 19:47 Timerplay3.PNG
文件 16601 2010-11-15 19:46 Timer
ecord3.PNG
文件 21486 2010-11-15 19:48 Timerstop3.PNG
文件 836096 2010-11-15 20:50 TimerTimerinDebugEasy Timer.exe
文件 30208 2010-11-15 20:50 TimerTimerinDebugEasy Timer.pdb
文件 11600 2010-11-15 20:45 TimerTimerinDebugEasy Timer.vshost.exe
文件 490 2010-03-17 22:39 TimerTimerinDebugTimer.vshost.exe.manifest
文件 238142 2010-11-12 16:13 TimerTimerFinalIcon.ico
文件 6728 2010-11-15 20:50 TimerTimerForm1.cs
文件 7327 2010-11-15 20:50 TimerTimerForm1.Designer.cs
文件 363727 2010-11-15 20:50 TimerTimerForm1.resx
文件 8403 2010-11-15 16:51 TimerTimerobjx86DebugDesignTimeResolveAssemblyReferences.cache
文件 6663 2010-11-15 20:50 TimerTimerobjx86DebugDesignTimeResolveAssemblyReferencesInput.cache
文件 836096 2010-11-15 20:50 TimerTimerobjx86DebugEasy Timer.exe
文件 30208 2010-11-15 20:50 TimerTimerobjx86DebugEasy Timer.pdb
文件 2132 2010-11-15 20:50 TimerTimerobjx86DebugGenerateResource.read.1.tlog
文件 838 2010-11-15 20:50 TimerTimerobjx86DebugGenerateResource.write.1.tlog
文件 8031 2010-11-15 13:17 TimerTimerobjx86DebugResolveAssemblyReference.cache
文件 5632 2010-11-15 19:49 TimerTimerobjx86DebugTempPEProperties.Resources.Designer.cs.dll
文件 651 2010-11-15 20:50 TimerTimerobjx86DebugTimer.csproj.FileListAbsolute.txt
文件 238708 2010-11-15 20:50 TimerTimerobjx86DebugTimer.Form1.resources
文件 344807 2010-11-15 20:50 TimerTimerobjx86DebugTimer.Properties.Resources.resources
文件 499 2010-11-14 19:40 TimerTimerProgram.cs
文件 1440 2010-11-12 15:09 TimerTimerPropertiesAssemblyInfo.cs
文件 586 2010-11-15 16:26 TimerTimerPropertiesDataSourcesTimeRecord.datasource
文件 5581 2010-11-15 19:49 TimerTimerPropertiesResources.Designer.cs
文件 8605 2010-11-15 19:49 TimerTimerPropertiesResources.resx
文件 1088 2010-11-12 15:09 TimerTimerPropertiesSettings.Designer.cs
............此处省略32个文件信息
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。
评论列表(条)