有多种同步方式可以用的,
如CreateEvent、CreateMutex等都可以。

解决方案 »

  1.   

    你可以这样做:
    main()
    {
    int testnum=程序1;
    if (testnum==1)
       程序2;
    }
    也可以:
    main()
    {
    do
    {
    }while(!(程序1));//当程序1返回真的时候,退出循环。
    程序2;
    }
      

  2.   

    to Mercedes:能否给出具体的代码?
    to qingrun:?????
    急死我了,那位老大能给出具体的代码,我愿再加100分!!!
      

  3.   

    这样试试:
    procedure tform1.button1click(sender:object);
    try
      Image1.Picture.Bitmap.loadfromfile('c:\aa.bmp');
    except
         button1.click;
    end;