各位大哥大姐,用多线程显示两个窗口,可以吗?

解决方案 »

  1.   

    不用多现成也可以阿,就是总有一个是active把
      

  2.   

    >>各位大哥大姐,用多线程显示两个窗口,可以吗?
    處理同步更新而已
      

  3.   

    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'
    谢谢!!!
    错在呢?