博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2011年2月16日

摘要: < 新建一个VS2005 WinForm项目,在项目的.cs文件中加入以下代码:1、引入命名空间: using System.Runtime.InteropServices;2、在窗口类中加入:[DllImport("user32.dll")]public static extern bool SetWindowPos(IntPtr hWnd, IntPtr hPos, int x, int y, int cx, int cy, uint nflags);3、在窗口的Load事件中加入:置顶IntPtr HWND_TOPMOST = new IntPtr(-1);SetWindowPos 阅读全文

posted @ 2011-02-16 22:52 hyruur 阅读(871) 评论(0) 推荐(0) 编辑