首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > .NET >

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

2012-02-26 
Delphi代码 转C#代码就两句话 (本人对Delphi 一点都不懂)FrmMain.ParentWindow:StrToInt(Edt3.Text)Brin

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); 

热点排行