如何从 C# 桌面应用程序以全屏模式打开默认浏览器?
嗨&感谢您的关注!
如何从 C# 桌面应用程序以全屏模式打开默认浏览器?我在SO上看到了类似的问题:
。 。但没有任何解决方法可以从 C# 在全屏浏览器窗口中打开本地 HTML 文件(C: 驱动器)。
我可以使用以下命令打开窗口:
Process.Start("http://google.com");
但是如何使其默认为全屏?有没有办法模拟 F11 按键,甚至更直接的方法?
编辑:理想情况下,我不需要打开表格。我不想混淆这个问题,但我正在试验 Kinect 语音识别引擎,并将在系统托盘中运行一个程序,始终监听。我已经达到了可以说出命令并且它会的程度。 。 。
//do stuff
。 。在这种情况下,我只希望它以全屏模式打开默认浏览器。
因此,我不必能够在全屏和常规屏幕之间来回切换,只需以全屏启动即可。我在想 F11 新闻机的模拟将是答案,但听起来我需要为此打开一个表格?
谢谢!
马特
Hi & thanks for looking!
How do I open default browser in fullscreen mode from a C# desktop application? I have seen similar questions on SO:
How to open in default browser in C#
. . .BUT nothing addresses opening a local HTML file (C: drive) in a FULLSCREEN browser window from C#.
I can open the window using this:
Process.Start("http://google.com");
But how do I make it default to fullscreen? Is there a way to simulate the F11 key press, or even something more direct?
EDIT: Ideally, I will not need to have a form open. I don't want to confuse the issue, but I am experimenting with the Kinect Speech Recognition engine and will have a program running in the system tray, always listening. I already have it to a point that I can say a command and it will. . .
//do stuff
. . .and in this case, I just want it to open the default browser in fullscreen mode.
So, I don't have to be able to toggle back and forth between fullscreen and regular screen, just launch in fullscreen. I was thinking that a simulation of the F11 press would be the answer, but it sounds like I need a form open for this??
Thanks!
Matt
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
为此,您需要使用 sendkeys
查找在列表中您需要类似的内容:
ActiveForm.SendKeys("{F11}");
希望能解决您的问题。
For that you would need to use sendkeys
Looking at the list you need something like:
ActiveForm.SendKeys("{F11}");
Hope that solves your issue.
SendKeys 不需要代替
吗
wouldn't the SendKeys need to be
instead of