如何安全地关闭谷歌浏览器编程 [英] How to safely close Google Chrome programmatically
本文介绍了如何安全地关闭谷歌浏览器编程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何通过C#我安全地关闭谷歌浏览器?我可以杀了镀铬处理,但在这种情况下,谷歌Chrome浏览器将在下次运行报告APPCRASH。
How can i safely close google chrome via C#? I can kill chrome process, but in this case Google Chrome will report appcrash on next run.
推荐答案
您可以尝试以确定使用进程
类的窗口句柄(S),并发送一个 WM_CLOSE
消息窗口。
You could try to determine the window handle(s) using the Process
class and send a WM_CLOSE
message to the window.
这篇关于如何安全地关闭谷歌浏览器编程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文