社区
C#
帖子详情
关于 process.mainwindowhandle
smallxu
2008-07-11 06:44:44
我用 process.start启动事件查看器后(eventvwr),为什么不能获取mainwindowhandle?而启动notepad就 可以获取mainwindowhandle?
...全文
105
3
打赏
收藏
关于 process.mainwindowhandle
我用 process.start启动事件查看器后(eventvwr),为什么不能获取mainwindowhandle?而启动notepad就 可以获取mainwindowhandle?
复制链接
扫一扫
分享
转发到动态
举报
AI
作业
写回复
配置赞助广告
用AI写文章
3 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
smallxu
2008-07-13
打赏
举报
回复
谢谢 回答 ,那么 为 什么打开notepad进程 不退出呢 ?
mabaoyes
2008-07-11
打赏
举报
回复
//mmc 进程查看
private void button4_Click(object sender, EventArgs e)
{
Process[] eventvwrPro = Process.GetProcessesByName("mmc");
try
{
if (eventvwrPro[0].MainWindowTitle != null)
MessageBox.Show(eventvwrPro[0].MainWindowTitle);
}
catch(Exception eee)
{
}
}
mabaoyes
2008-07-11
打赏
举报
回复
事件查看器是 mmc.exe 打开的事件查看器,进程退出
mainwindowhandle 和 MainWindowTitle
都取不到
process
类 任务管理器 完整c#代码源码
process
类 任务管理器 完整c#代码源码 里面含有新建任务 结束任务 资源管理 进程加载 最小化 代码浏览等功能 c#
process
类编写出来
Article_src.zip_On Message_SetParent_嵌入 EXE_嵌入窗体_嵌套程序
把某个程序,嵌入到自己的程序中 this.exeName = @"D:\Program Files\Microsoft Office\OFFICE11\WINWORD.exe"; try { // Start the
process
process
= System.Diagnostics.
Process
.Start(this.exeName); // Wait for
process
to be created and enter idle condition
process
.WaitForInputIdle(); // Get the
main
handle
appWin =
process
.
Main
Window
Handle
; } catch (Exception ex) { MessageBox.Show(this, ex.Message, "Error"); } // Put it into this form SetParent(appWin, this.
Handle
); // Remove border and whatnot // Set
Window
Long(appWin, GWL_STYLE, WS_VISIBLE); // Move the
window
to overlay it on this
window
Move
Window
(appWin, 0, 0, this.Width, this.Height, true);
VB_Use_
Process
_Class_and_Shell_Functionality.rar_The
Process
_vb.
VB.NET - NET Framework - Use the
Process
Class and Shell Functionality
WPF中嵌入其它应用程序窗口
WPF中嵌入其它应用程序窗口, 可以嵌入其他exe应用程序的窗口,指定exe路径即可,封装好的源码,具有很好的参考价值,也可以直接复用类
C#进程源码.zip
C#源代码
C#
111,097
社区成员
642,554
社区内容
发帖
与我相关
我的任务
C#
.NET技术 C#
复制链接
扫一扫
分享
社区描述
.NET技术 C#
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
让您成为最强悍的C#开发者
试试用AI创作助手写篇文章吧
+ 用AI写文章