C#调用Win32_的API函数--User32.dll
来自森大科技官方博客 http://www.cnsendblog.com/index.php/?p=230 GPS平台、网站建设、软件开发、系统运维,找森大网络科技! http://cnsendnet.taobao.com C#调用Win32 的API函数--User32.dll Win32的API函数是微软自己的东西,可以直接在C#中直接调用,在做WinForm时还是很有帮助的。有时候我们之直接调用Win32 的API,可以很高效的实现想要的效果。 代码 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Runtime.InteropServices; namespace WindowsAPI { class CSharp_Win32Api { #region User32.dll 函数 /// <summary> /// 该函数检索一指定窗口的客户区域或整个屏幕的显示设备上下文环境的句柄,以后可以在GDI函数中使用该句柄来在设备上下文环境中绘图。hWnd:设备上 下文环境被检索的窗口的句柄 /// </summary> [DllImport("user32.dll", CharSet = CharSet.Auto)] public