自己流程中的C#资源管理器窗口 [英] C# explorer-window in own Process

查看:181
本文介绍了自己流程中的C#资源管理器窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿,

wenn从cmd运行此命令:

Hey,

wenn running this command from cmd:

c:\windows\explorer.exe "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{21EC2020-3AEA-1069-A2DD-08002B30309D}\::{2227A280-3AEA-1069-A2DE-08002B30309D}"



打印机和传真仅通过此窗口在自己的进程(2.explorer.exe)中打开.
当我使用这些参数创建explorer.exe的快捷方式时,相同.

但是!
如果我使用



printers and faxes open, in an own process (2. explorer.exe) with only this window.
When i create a shortcut of explorer.exe with these parameters, same.

BUT!
If i use

Process.Start(@"c:\windows\explorer.exe", @"::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{21EC2020-3AEA-1069-A2DD-08002B30309D}\::{2227A280-3AEA-1069-A2DE-08002B30309D}");



在c#中,打印机和传真窗口也同时打开,但是在与已经运行的资源管理器过程中一样(带有任务栏等)

我还尝试将工作目录设置为"c:\ windows",但它也无法正常工作.

任何想法,如何在新流程中打开它?

希望获得帮助.

欢呼
aspire1337



in c# the printers and faxes windows open too, but in same explorer process as already running (with taskbar etc.)

I also tried to set the workingdirectory to "c:\windows", but it doesnt work too.

Any Idea, how to open it in an new Process?

hope for help.

cheers
aspire1337

推荐答案


使用 ProcessStartInfo 并将 CreateNoWindow UseShellExecute 设置为所需的值,具体取决于您要实现的目标.

探索此链接:
1. CreateNoWindow与UseShellExecute组合 [ ProcessStartInfo类 [
Hi,
Use ProcessStartInfo and set CreateNoWindow and UseShellExecute to desired values depending what you want to achieve.

Explore this links:
1. CreateNoWindow in combination with UseShellExecute[^]
2. ProcessStartInfo Class[^]


这篇关于自己流程中的C#资源管理器窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆