如何实现主窗体总是显示在最下面?即其他窗体显示在主窗体的上面,不是主从窗体

解决方案 »

  1.   

    BOOL SetWindowPos(
      HWND hWnd,             // handle to window
      HWND hWndInsertAfter,  // placement-order handle
      int X,                 // horizontal position
      int Y,                 // vertical position
      int cx,                // width
      int cy,                // height
      UINT uFlags            // window-positioning options
    );
    第二个参数用HWND_BOTTOM
    SetWindowPos(Form1.handle,HWND_BOTTOM,0,0,100,100,0);
    Microsoft OLE DB Provider for SQL Server 错误 '80040e31' 超时已过期 /Expert/reply.asp,行105
      

  2.   

    BOOL SetWindowPos(
      HWND hWnd,             // handle to window
      HWND hWndInsertAfter,  // placement-order handle
      int X,                 // horizontal position
      int Y,                 // vertical position
      int cx,                // width
      int cy,                // height
      UINT uFlags            // window-positioning options
    );
    第二个参数用HWND_BOTTOM
    SetWindowPos(Form1.handle,HWND_BOTTOM,0,0,100,100,0);
      

  3.   

    可以用模式窗体呀
    即Form2.ShowModale;