本文介绍了需要从VB code转换到C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 有人可以翻译我下面的code从VB到C#?据我的理解是声明的函数的调用由本地库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"...声明函数SetForegroundWindow库USER32(BYVAL HWND为整数)作为整数Declare Function SetForegroundWindow Lib "user32" (ByVal hwnd As Integer) As Integer推荐答案查看 PInvoke的:Check out PInvoke:[DllImport("user32.dll")][return: MarshalAs(UnmanagedType.Bool)]static extern bool SetForegroundWindow(IntPtr hWnd); 这篇关于需要从VB code转换到C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-15 10:18