各位大哥大姐,用多线程显示两个窗口,可以吗? 各位大哥大姐,用多线程显示两个窗口,可以吗? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 不用多现成也可以阿,就是总有一个是active把 >>各位大哥大姐,用多线程显示两个窗口,可以吗?處理同步更新而已 unit UMyThd;interfaceuses Classes,UShow,Fm_SubPrj;type TMythread1=class(TThread) procedure Ashow; procedure Execute;override;end; procedure TMythread1.Ashow; begin TSubPrj_Frm.Create(nil).Show; end; procedure TMythread1.Execute; begin synchronize(Ashow); end; type TMythread2=class(TThread) procedure Bshow; procedure Execute;override;end; procedure TMythread2.Bshow; begin TSubPrj_Frm.Create(nil).Show; end; procedure TMythread2.Execute; begin synchronize(Bshow); end;end.出错Build [Error] UMyThd.pas(14): Identifier redeclared: 'TMythread1.Ashow' [Error] UMyThd.pas(18): Identifier redeclared: 'TMythread1.Execute' [Error] UMyThd.pas(19): Undeclared identifier: 'synchronize' [Error] UMyThd.pas(19): Undeclared identifier: 'Ashow' [Error] UMyThd.pas(28): Identifier redeclared: 'TMythread2.Bshow' [Error] UMyThd.pas(32): Identifier redeclared: 'TMythread2.Execute' [Error] UMyThd.pas(33): Undeclared identifier: 'Bshow' [Error] UMyThd.pas(37): 'IMPLEMENTATION' expected but '.' found [Error] UMyThd.pas(39): Declaration expected but end of file found [Error] UMyThd.pas(10): Unsatisfied forward or external declaration: 'TMythread1.Ashow' [Error] UMyThd.pas(11): Unsatisfied forward or external declaration: 'TMythread1.Execute' [Error] UMyThd.pas(24): Unsatisfied forward or external declaration: 'TMythread2.Bshow' [Error] UMyThd.pas(25): Unsatisfied forward or external declaration: 'TMythread2.Execute' [Fatal Error] Project1.dpr(41): Could not compile used unit 'UMyThd.pas'谢谢!!!错在呢? 怎么在控件的父类添加一个属性呢? 如何解决软件关闭之后打开上次的状态? ★★★ 高分求助!我的idHttp为什么不能提交数据到表单? 大哥大姐看看吧 fieldbyname????不能读>? 如何判断edit 中汉字的个数 我的DELPHI7在新建intraweb应用时找不到intraweb选项卡,怎么半? 如何在Form中放四个panel,且四个panel的大小一致,四个panel要占满整个form 还是那个图像问题-再线急等 请问delphi到了什么水平,才能找到工作? 一个大菜鸟的问题! 如何实现Delphi打印Word文档。。。请各位大虾帮帮忙 刚学delphi有几个很菜的问题???
處理同步更新而已
Classes,UShow,Fm_SubPrj;type
TMythread1=class(TThread)
procedure Ashow;
procedure Execute;override;
end; procedure TMythread1.Ashow;
begin
TSubPrj_Frm.Create(nil).Show;
end;
procedure TMythread1.Execute;
begin
synchronize(Ashow);
end; type
TMythread2=class(TThread)
procedure Bshow;
procedure Execute;override;end;
procedure TMythread2.Bshow;
begin
TSubPrj_Frm.Create(nil).Show;
end;
procedure TMythread2.Execute;
begin
synchronize(Bshow);
end;end.
出错
Build
[Error] UMyThd.pas(14): Identifier redeclared: 'TMythread1.Ashow'
[Error] UMyThd.pas(18): Identifier redeclared: 'TMythread1.Execute'
[Error] UMyThd.pas(19): Undeclared identifier: 'synchronize'
[Error] UMyThd.pas(19): Undeclared identifier: 'Ashow'
[Error] UMyThd.pas(28): Identifier redeclared: 'TMythread2.Bshow'
[Error] UMyThd.pas(32): Identifier redeclared: 'TMythread2.Execute'
[Error] UMyThd.pas(33): Undeclared identifier: 'Bshow'
[Error] UMyThd.pas(37): 'IMPLEMENTATION' expected but '.' found
[Error] UMyThd.pas(39): Declaration expected but end of file found
[Error] UMyThd.pas(10): Unsatisfied forward or external declaration: 'TMythread1.Ashow'
[Error] UMyThd.pas(11): Unsatisfied forward or external declaration: 'TMythread1.Execute'
[Error] UMyThd.pas(24): Unsatisfied forward or external declaration: 'TMythread2.Bshow'
[Error] UMyThd.pas(25): Unsatisfied forward or external declaration: 'TMythread2.Execute'
[Fatal Error] Project1.dpr(41): Could not compile used unit 'UMyThd.pas'
谢谢!!!
错在呢?