开发者

Need code translation from VB to C#

Can someone translate me the following code from VB to C#? As far as I understand it is declaration of a function that calls another function from the native library "user32.dll"...

Declare Function SetForegroundWindo开发者_JAVA百科w Lib "user32" (ByVal hwnd As Integer) As Integer


Check out PInvoke:

[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool SetForegroundWindow(IntPtr hWnd);


If you need a code translation from VB.NET to C# or from C# to VB.NET you can go to http://www.developerfusion.com/tools/convert/csharp-to-vb/, here you can convert from one language to another practically any code you can imagine and type.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜