unit unit1;
inte***ce
uses
windows, messages, sysutils, variants, classes, graphics, controls, forms,
dialogs, stdctrls;
var flag:integer;
var n1: cardinal;
type
tform1 = class(tform)
label1: tlabel;
label2: tlabel;
first: tedit;
second: tedit;
result: tedit;
btn_begin: tbutton;
btn_judge: tbutton;
lab: tlabel;
label3: tlabel;
label4: tlabel;
lab_true: tlabel;
lab_false: tlabel;
lab_totel: tlabel;
procedure btn_beginclick(sender: tobject);
procedure btn_judgeclick(sender: tobject);
private
public
end;
varform1: tform1;
implementation
procedure tform1.btn_beginclick(sender: tobject);
var f,s:integer;
begin
n1 := gettickcount; //get soft run time
randomize; // let random initialize
f := 10+random(90); // build a number from (0,100]
s := 10+random(90); //the same with up row
first.text := inttostr(f); // transform int to string
second.text := inttostr(s);
result.setfocus;
btn_begin.enabled := false; // éèö㿪꼰´å¥îª²»¿éóã
btn_judge.enabled := true; // åð¶ï°´å¥¿éóã
end;
end;
end.
Delphi 第乙個hello world程式
這裡delphi做乙個簡單介紹,因為現在移動網際網路時代的崛起,桌面應用程式沒有以前那麼流行,不知道關注delphi的人還多不。用delphi開發桌面應用程式是很快的,第一聽說delphi這種語言是在一本黑客 裡面,然後就關注了一下delphi,發現delphi 挺強大的,大名鼎鼎的熊貓燒香病毒 就...
第乙個視窗程式
程式截圖 程式 include lresult callback wndproc hwnd,uint,wparam,lparam int winapi winmain hinstance hinstance,hinstance hprevinstance,pstr szcmdline,int icm...
第乙個popcap 程式
一 tips ddimage mmapimg ddimage 上f12,定位到ddimage.h,在vs2008 中ddimage.h tab標籤上alt o 定位到ddimage.cpp 二 vs2008 中c c code generation runtime library 設成multi t...