在一个应用程序中怎么才能操作另外一个应用程序,让它的主窗体置顶呢?同时第一个应用程序与第二个应用程序并排放!这个怎么实现呢?

解决方案 »

  1.   

    操作另外的应用程序只能使用WINDOWS的消息机制 用消息发送和响应的理论来做
      

  2.   

    或者:
    ShellExecute和CreateProcess函数
    用法参考MSDN!
      

  3.   

    SetWindowPos    winapi
      

  4.   

    FindWindow                              返回一个与类和窗口名相关的窗口
    GetWindow                               返回指定窗口句柄  
    SetActiveWindow                         激活顶级窗口
      

  5.   

    先获得指定窗口的句柄
    然后setforgroudwindow(hwnd)
      

  6.   

    theHandle:=FindWindow/WindowFromPosition
    ShowWindow(theHandle,WS_TOPMOST)
      

  7.   

    Winexec或ShellExecute,用法参考delphi隨機的help!