开发者

Need code translation from VB to C#

开发者 https://www.devze.com 2023-02-01 03:37 出处:网络
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\"...

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

精彩评论

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