Thursday, December 20, 2007

如何取得系統時間

#include time.h

A = clock();

如何動態新增一個影像元件?

TImage *imNew;

imNew = new TImage(this);
imNew->Parent = RScrollBox;
imNew->Left = 2;
imNew->Top = 2;
imNew->Height = IH;
imNew->Width = IW;

上述這段程式, 如果執行時出現下面的錯誤訊息:

[Linker Error] Unresolved external '__fastcall Extctrls::TImage::TImage(Classes::TComponent *)' referenced from...

解決辦法:

'Project | Options | (tab) Packages | (Groupbox) Runtime Packages',

將 Build with Runtime Packages 的勾勾去掉...