赞
踩
unity实现不同Windows应用窗口间的交互和窗口的透明及穿透,但不仅限于unity应用实现。
调用动态库
[DllImport("user32.dll")] static extern IntPtr GetForegroundWindow(); //获取最前端窗体句柄 /// <summary> /// 获取窗口句柄 /// </summary> /// <returns></returns> [DllImport("user32.dll")] private static extern IntPtr GetActiveWindow(); /// <summary> /// 设置窗体透明 /// </summary> /// <param name="hWnd"></param> /// <param name="nIndex"></param> /// <param name="dwNewLong"></param> /// <returns></returns> [DllImport("user32.dll")] private static extern int SetWindowLong(IntPtr hWnd, int nIndex, uint dwNewLong); [DllImport("Dwmapi.dll")] private
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。