FrmMain.ParentWindow:=StrToInt(Edt3.Text);
    BringWindowToTop(FrmMain.Handle);

解决方案 »

  1.   

    还有这一句!
    MoveWindow(StrToInt(Edt2.Text),170,0,screen.Width-170,screen.Height,False);
      

  2.   


    [DllImport("user32.dll",EntryPoint="BringWindowToTop")]
    private static extern int BringWindowToTop(int hWnd);BringWindowToTop(FrmMain.Handle.ToInt32());
      

  3.   

    [DllImport("user32.dll",EntryPoint="MoveWindow")]
    public static extern int MoveWindow(int hwnd, int x, int y, int nWidth, int nHeight, int bRepaint) 
    MoveWindow(FrmMain.Handle.ToInt32(),170,0,screen.Width-170,screen.Height,0);
      

  4.   

    错误 1 非静态的字段、方法或属性“System.Windows.Forms.Control.Handle.get”要求对象引用 135 \test\test1221\test1221\Form1.cs 27 test1221错误代码:FrmMain.Handle这是什么原因呀!
      

  5.   

    FrmMain.ParentWindow:=StrToInt(Edt3.Text); (1)
            BringWindowToTop(FrmMain.Handle);  (2)
    MoveWindow(StrToInt(Edt2.Text),170,0,screen.Width-170,screen.Height,False);(3)C#我也不懂我帮你解释一下这个吧 (1):我想是得到窗体FrmMain的父窗体
    (2):我想是把窗体FrmMain 至顶
    BringToFront()是把窗体放到最前面(3):我想是移动吧
      

  6.   

    FrmMain.ParentWindow:=StrToInt(Edt3.Text); (1)
            BringWindowToTop(FrmMain.Handle);  (2)
    MoveWindow(StrToInt(Edt2.Text),170,0,screen.Width-170,screen.Height,False);(3)C#我也不懂我帮你解释一下这个吧 (1):我想是得到窗体FrmMain的父窗体
    (2):我想是把窗体FrmMain 至顶
    BringToFront()是把窗体放到最前面(3):我想是移动吧