Delphi代码 转C#代码 就两句话 (本人对Delphi 一点都不懂)解决办法

Delphi代码 转C#代码 就两句话 (本人对Delphi 一点都不懂)
FrmMain.ParentWindow:=StrToInt(Edt3.Text);
  BringWindowToTop(FrmMain.Handle);

------解决方案--------------------
C# code

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



BringWindowToTop(FrmMain.Handle.ToInt32());

------解决方案--------------------
C# code
[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);