線上訂房服務-台灣趴趴狗聯合訂房中心
發文 回覆 瀏覽次數:1125
推到 Plurk!
推到 Facebook!

耍寶系列--另類小時鍾

 
arnoyu
中階會員


發表:73
回覆:88
積分:67
註冊:2003-03-21

發送簡訊給我
#1 引用回覆 回覆 發表時間:2003-06-19 20:04:19 IP:61.56.xxx.xxx 未訂閱
今天收到一封e-mail,裡面要我連去看一個Flash做的Cool時鐘(日本人做的),    保證你沒看過這種時鐘 http://www.lares.dti.ne.jp/%7Eyugo/storage/monocrafts_ver3/03/index.html    ================================================================== 沒寫過程式的會覺得真的好厲害喔!因為我也曾學Flash一陣子,本想用身邊 的照相機拍一些手的短片,將它做成另一種Style的時鐘,但,心想, 在這邊都沒貢獻文章過,所以花了快一個小時,做了這個BCB版的時鐘, 提供新手作為參考...    ps: 本想在改進的,因為沒有必要每秒鐘更新年月日及時分, 只要再加上幾個變數跟判斷就能讓效能較高, 但,如此反而讓程式有點亂,如此簡簡單單,乾乾淨淨, 讓新手更能感受BCB的好用ㄅ~~  ==================================================================== src="http://delphi.ktop.com.tw/loadfile.php?TOPICID=10223219&CC=228641"> ==================================================================== //--------------------------------------------------------------------------- void __fastcall TForm1::Timer1Timer(TObject *Sender) { set_time1(Timer1); } //--------------------------------------------------------------------------- void __fastcall TForm1::BitBtn1Click(TObject *Sender) { if(BitBtn1->Caption=="按下啟動") { Timer1->Enabled=true; BitBtn1->Caption="按下停止"; } else { BitBtn1->Caption="按下啟動"; Timer1->Enabled=false; } } //--------------------------------------------------------------------------- void __fastcall TForm1::FormCreate(TObject *Sender) { set_time1(this); } //--------------------------------------------------------------------------- void __fastcall TForm1::set_time1(TObject *Sender) { AnsiString temp1; temp1=Now().FormatString("yyyymmddhhnnss"); //將日期格式 格式化成 "年年年年月月日日時時分分秒秒" ImageList1->GetBitmap(StrToInt(temp1.SubString(1,1)),Img_y1->Picture->Bitmap); Img_y1->Refresh(); //當 ImageList1 指定圖形給 Image物件時 , Image須 重繪圖形 ImageList1->GetBitmap(StrToInt(temp1.SubString(2,1)),Img_y2->Picture->Bitmap); Img_y2->Refresh(); ImageList1->GetBitmap(StrToInt(temp1.SubString(3,1)),Img_y3->Picture->Bitmap); Img_y3->Refresh(); ImageList1->GetBitmap(StrToInt(temp1.SubString(4,1)),Img_y4->Picture->Bitmap); Img_y4->Refresh(); ImageList1->GetBitmap(StrToInt(temp1.SubString(5,1)),Img_m1->Picture->Bitmap); Img_m1->Refresh(); ImageList1->GetBitmap(StrToInt(temp1.SubString(6,1)),Img_m2->Picture->Bitmap); Img_m2->Refresh(); ImageList1->GetBitmap(StrToInt(temp1.SubString(7,1)),Img_d1->Picture->Bitmap); Img_d1->Refresh(); ImageList1->GetBitmap(StrToInt(temp1.SubString(8,1)),Img_d2->Picture->Bitmap); Img_d2->Refresh(); ImageList1->GetBitmap(StrToInt(temp1.SubString(9,1)),Img_h1->Picture->Bitmap); Img_h1->Refresh(); ImageList1->GetBitmap(StrToInt(temp1.SubString(10,1)),Img_h2->Picture->Bitmap); Img_h2->Refresh(); ImageList1->GetBitmap(StrToInt(temp1.SubString(11,1)),Img_n1->Picture->Bitmap); Img_n1->Refresh(); ImageList1->GetBitmap(StrToInt(temp1.SubString(12,1)),Img_n2->Picture->Bitmap); Img_n2->Refresh(); ImageList1->GetBitmap(StrToInt(temp1.SubString(13,1)),Img_s1->Picture->Bitmap); Img_s1->Refresh(); ImageList1->GetBitmap(StrToInt(temp1.SubString(14,1)),Img_s2->Picture->Bitmap); Img_s2->Refresh(); } //--------------------------------------------------------------------------- void __fastcall TForm1::Label8Click(TObject *Sender) { ShellExecute(NULL, "open", "http://delphi.ktop.com.tw/", NULL, NULL, SW_SHOWNORMAL); } //--------------------------------------------------------------------------- void __fastcall TForm1::Label8MouseMove(TObject *Sender, TShiftState Shift, int X, int Y) { Label8->Font->Color=clRed; } //--------------------------------------------------------------------------- void __fastcall TForm1::FormMouseMove(TObject *Sender, TShiftState Shift, int X, int Y) { Label8->Font->Color=clBlue ; } //--------------------------------------------------------------------------- ===三人行必有我師焉===
附加檔案:32664_times.zip
系統時間:2024-09-10 2:47:51
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!