First you generate a unit that include a class derive from TThread,like this:
TThread1=class(TThread)
var
Thread:TThread1;
and then uses this unit in your main program.So you can start the thread and stop it like these:
//Start:
Thread=TThread1.create(True);//you can use false if you don't want to run the thread and then use Thread.run starting it.
//pause,Stop:
Thread.suspend;
Thread.ternimate;
TThread1=class(TThread)
var
Thread:TThread1;
and then uses this unit in your main program.So you can start the thread and stop it like these:
//Start:
Thread=TThread1.create(True);//you can use false if you don't want to run the thread and then use Thread.run starting it.
//pause,Stop:
Thread.suspend;
Thread.ternimate;
解决方案 »
- 关于两窗体DB控件提交数据库的问题
- 请教关于word嵌入窗体里的问题.急,急,急,啊!!!!!!!!!
- 谁有心铃之家数据库讲座中鲁抗医药集团劳保用品管理系统的源代码
- 关于udpsocket,udpserver
- value of field'count(*)'is out of range 错误?
- Delphi下文件关联问题
- 请教:关于Shell+Plugin的问题!
- sdwtao进来看
- 如何利用列表框中的数据作为查询条件读取一个数据表,并把读取到的数据插到新表
- 我的系统只能给'0'分怎么办,不能给'50'分??重新申请吗??
- trayicon程序中popupmenu不能自动消失的问题?
- 如何在打印报表中实现合计功能?
hthread := CreateThread(nil,0,@ThreadFunc,nil,0,ThreadID) ;
(安全属性,堆栈大小,线程函数指针,传递参数指针,线程标志,线程ID)