function MyThreadFunc(P:pointer):Longint;stdcall;
var
i:longint;
DC:HDC;
S:string;
begin
DC:=GetDC(FormPluginClient.Handle);
for i:=0 to 500000 do begin
S:=Inttostr(i);
Textout(DC,10,10,Pchar(S),length(S));
end;
ReleaseDC(FormPluginClient.Handle,DC);
end;procedure TFormPluginClient.PushTheButton;
begin
//Button1.Click();
end;procedure TFormPluginClient.UsedThreadClick(Sender: TObject);
var
hThread:Thandle;//定义一个句柄
ThreadID:DWord;
begin
Synchronize(PushTheButton);
//Synchronize(ThreadClick);
//创建线程,同时线程函数被调用
hthread:=CreateThread(nil,0,@MyThreadfunc,nil,0,ThreadID);
if hThread=0 then
messagebox(Handle,'Didn’tCreateaThread',nil,MB_OK);
end;
var
i:longint;
DC:HDC;
S:string;
begin
DC:=GetDC(FormPluginClient.Handle);
for i:=0 to 500000 do begin
S:=Inttostr(i);
Textout(DC,10,10,Pchar(S),length(S));
end;
ReleaseDC(FormPluginClient.Handle,DC);
end;procedure TFormPluginClient.PushTheButton;
begin
//Button1.Click();
end;procedure TFormPluginClient.UsedThreadClick(Sender: TObject);
var
hThread:Thandle;//定义一个句柄
ThreadID:DWord;
begin
Synchronize(PushTheButton);
//Synchronize(ThreadClick);
//创建线程,同时线程函数被调用
hthread:=CreateThread(nil,0,@MyThreadfunc,nil,0,ThreadID);
if hThread=0 then
messagebox(Handle,'Didn’tCreateaThread',nil,MB_OK);
end;
解决方案 »
- !!和朋友想开个烧烤店,有经验和想法的朋友来提点意见!!
- sql server表备份问题,不是整个数据库哦~
- 请问如何在树形控件中加入滚动条
- 【投票】2004年上半年Delphi版牛奖投票
- 關於將edit中的寫入的數據提交到數據庫中(再問,還不明白)
- Formula中如何通过代码控制打印从第几页到第几页??
- 有偿送分:-)利用ADO连接的查询问题
- CD也和硬盘一样有一个固定的ID号吗?
- 有谁能告诉我怎样才能够在DELPHI中实现对*.dwg文件的函数调用?(调用后直接打开显示dwg图形文件)。
- (特急)那位大哥知道如何购买 Formula One?
- 怎么选中dbgrid的单元格
- 怎样在数据库中修改dbgrid中选定的记录
'Did not '