C#windows app中的IE网页拨号问题 [英] IE webpage dialoge issue in C# windows app

查看:76
本文介绍了C#windows app中的IE网页拨号问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个Windows应用程序,其中一个客户端Web应用程序停靠在此Windows应用程序中。



它使用应用程序的窗口句柄停靠(设置父窗口命令)。



问题:



当我在正常IE中单击客户端应用程序上的按钮时(没有停靠)它打开了模型拨号。但是当我在停靠时尝试执行相同操作时,它会在IE网页的不同选项卡中打开而不是作为dialoge。这导致整个窗口应用程序冻结。



你能帮忙解决这个问题吗?



我试过的:



我尝试禁用菜单栏和工具栏,但如果我这样做,它会在单独的IE中打开。

I am working on one windows application where one of the client web application is docked inside this windows application.

It is docked using window handle of application (set parent window command).

ISSUE:

when i click a button on client application in normal IE (not docked) it opens up model dialoge. But when i try to do same when docked, it opens in different tab of IE web page and not as dialoge. This is leading to freezing of entire window application.

Can you help with this how to prevent this behaviour.

What I have tried:

I tried disabling menu bar and tool bar, but it opens in separate IE if i do that.

推荐答案

简单:不要弄乱属于其他应用程序的窗口。



如果要在应用程序中显示Web浏览器,使用 WebBrowser 控件( WPF [ ^ ] | Windows窗体 [ ^ ])嵌入IE渲染引擎。 NB:除非你修改注册表 [ ^ ]。)



或者使用 CefSharp - WinForms和WPF应用程序的快速Web浏览器 [ ^ ]嵌入Chrome渲染引擎。
Simple: don't mess with the windows belonging to other applications.

If you want to show a web browser inside your application, use the WebBrowser control (WPF[^] | Windows Forms[^]) to embed the IE rendering engine. (NB: This will be stuck in IE7 rendering mode unless you modify the registry[^].)

Or use something like CefSharp - Fast web browser for WinForms and WPF Apps[^] to embed the Chrome rendering engine.


这篇关于C#windows app中的IE网页拨号问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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