資源簡介
一個漂亮的毫秒級秒表,功能是:
1. 毫秒級精確,timer觸發,系統時間計時,絕對比timer的觸發累計計時精確
3. 快捷鍵設置,在程序沒有取得焦點的時候仍然可以用快捷鍵使用
4. 基本功能:開始計時,記錄時間點,暫停,歸零,復制或刪除記錄的時間點
5. 所有按鈕均為漂亮的圖片,包括程序圖標
注:這是整個工程文件,包括所有的圖片,文件夾中有程序截圖
我是用VS2010編的,低版本的應該也可以使用。

代碼片段和文件信息
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??Timer\FinalIcon.ico
?????文件??????21267??2010-11-15?19:48??Timer\pause3.PNG
?????文件??????22289??2010-11-15?19:47??Timer\play3.PNG
?????文件??????16601??2010-11-15?19:46??Timer\record3.PNG
?????文件??????21486??2010-11-15?19:48??Timer\stop3.PNG
?????文件?????836096??2010-11-15?20:50??Timer\Timer\bin\Debug\Easy?Timer.exe
?????文件??????30208??2010-11-15?20:50??Timer\Timer\bin\Debug\Easy?Timer.pdb
?????文件??????11600??2010-11-15?20:45??Timer\Timer\bin\Debug\Easy?Timer.vshost.exe
?????文件????????490??2010-03-17?22:39??Timer\Timer\bin\Debug\Timer.vshost.exe.manifest
?????文件?????238142??2010-11-12?16:13??Timer\Timer\FinalIcon.ico
?????文件???????6728??2010-11-15?20:50??Timer\Timer\Form1.cs
?????文件???????7327??2010-11-15?20:50??Timer\Timer\Form1.Designer.cs
?????文件?????363727??2010-11-15?20:50??Timer\Timer\Form1.resx
?????文件???????8403??2010-11-15?16:51??Timer\Timer\obj\x86\Debug\DesignTimeResolveAssemblyReferences.cache
?????文件???????6663??2010-11-15?20:50??Timer\Timer\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache
?????文件?????836096??2010-11-15?20:50??Timer\Timer\obj\x86\Debug\Easy?Timer.exe
?????文件??????30208??2010-11-15?20:50??Timer\Timer\obj\x86\Debug\Easy?Timer.pdb
?????文件???????2132??2010-11-15?20:50??Timer\Timer\obj\x86\Debug\GenerateResource.read.1.tlog
?????文件????????838??2010-11-15?20:50??Timer\Timer\obj\x86\Debug\GenerateResource.write.1.tlog
?????文件???????8031??2010-11-15?13:17??Timer\Timer\obj\x86\Debug\ResolveAssemblyReference.cache
?????文件???????5632??2010-11-15?19:49??Timer\Timer\obj\x86\Debug\TempPE\Properties.Resources.Designer.cs.dll
?????文件????????651??2010-11-15?20:50??Timer\Timer\obj\x86\Debug\Timer.csproj.FileListAbsolute.txt
?????文件?????238708??2010-11-15?20:50??Timer\Timer\obj\x86\Debug\Timer.Form1.resources
?????文件?????344807??2010-11-15?20:50??Timer\Timer\obj\x86\Debug\Timer.Properties.Resources.resources
?????文件????????499??2010-11-14?19:40??Timer\Timer\Program.cs
?????文件???????1440??2010-11-12?15:09??Timer\Timer\Properties\AssemblyInfo.cs
?????文件????????586??2010-11-15?16:26??Timer\Timer\Properties\DataSources\TimeRecord.datasource
?????文件???????5581??2010-11-15?19:49??Timer\Timer\Properties\Resources.Designer.cs
?????文件???????8605??2010-11-15?19:49??Timer\Timer\Properties\Resources.resx
?????文件???????1088??2010-11-12?15:09??Timer\Timer\Properties\Settings.Designer.cs
............此處省略32個文件信息
- 上一篇:餐飲管理系統(源碼+資料
- 下一篇:asp.net+Sql server實踐項目源碼
評論
共有 條評論