摘要: 实例调用:显示记事本(还有其他一些具体应用有时需要几个函数一起配合使用) [DllImport("User32.dll", EntryPoint = "FindWindow")] private static extern IntPtr FindWindow(string lpClassName, string lpWindowName); IntPtr hWnd = FindWindow("Notepad", "test.txt - 记事本");//记事本句柄,要用到FindWindow函数 ShowWindow((int)hWnd, 1); //SetWindowPos((int)hWnd, -1, 0, 0, 0, 0, 1);//将记事本窗体设置为置顶 //SetForegroundWindow((int)hWnd);// //SetActiveWindow((int)hWnd);//激活窗口 阅读全文
posted @ 2009-05-13 22:43 trace007 阅读(2162) 评论(0) 推荐(0) 编辑