level 7
王氏家族集团
楼主
例子:
uses windows; //声明使用windows库,牛逼的自己声明function也可以
var
tid:dword;//定义变量(我也不知道干啥)
procedure p1;//子程序1
begin
messagebox(0,'1','1',mb_ok);
exitthread(0);
end;
procedure p2;//子程序2
begin
messagebox(0,'2','2',mb_ok);
exitthread(0);
end;
begin
createthread(nil,0,@p1,nil,0,tid);//多进程运行子程序1
createthread(nil,0,@p2,nil,0,tid);//多进程运行子程序2
messagebox(0,'3','3',mb_ok);//运行主程序
end.
效果:同时显示三个信息框,提高程序效率
PS:竞赛时不允许



2014年07月15日 12点07分
1
uses windows; //声明使用windows库,牛逼的自己声明function也可以
var
tid:dword;//定义变量(我也不知道干啥)
procedure p1;//子程序1
begin
messagebox(0,'1','1',mb_ok);
exitthread(0);
end;
procedure p2;//子程序2
begin
messagebox(0,'2','2',mb_ok);
exitthread(0);
end;
begin
createthread(nil,0,@p1,nil,0,tid);//多进程运行子程序1
createthread(nil,0,@p2,nil,0,tid);//多进程运行子程序2
messagebox(0,'3','3',mb_ok);//运行主程序
end.
效果:同时显示三个信息框,提高程序效率
PS:竞赛时不允许


