webbrowser-control

Retrieving Selected Text from Webbrowser control in Windows phone 7

只谈情不闲聊 提交于 2019-12-06 10:04:12
I am trying to Retrieve selected text from Webbrowser control in Windows phone 7 when it is selected using Tap. Also want to remove the Copy icon when you select the Text. When on Hold Tapping I want to confirm that webbrowser control has any selected text. How could i place a check there. Also i want to Highlight the Selected Text in Webbrowser Control. So problem here is to identify the start and stop of Selected text. I appreciate any help or resources regarding this. Thanks By Calling function GetSelectedText() { window.external.Notify(document.selection.createRange().htmlText); } and

Detect scroll to bottom in WebBrowser control

﹥>﹥吖頭↗ 提交于 2019-12-06 09:34:56
问题 I am creating a Windows Form to accept some terms and conditions for a company. So the terms and conditions are on the web and it is navigated to the WinForm through WebBrowser control. It is required to enable the Accept button only after the full document is scrolled to the bottom. I am searching for an Event similar to ValueChanged Event in VScrollBar control(mentioned below) or any other option. private void vScrollBar1_ValueChanged(object sender, EventArgs e) { if (vScrollBar1.Value+9 ==

Problems having content in webbrowser scale automatically in Windows Form Application

别来无恙 提交于 2019-12-06 09:29:58
I'm trying to create a program which scrolls through files located on my computer and displays the files. This is working for me so far but I'm getting content in actual size so the webbrowser adds a scrollbar(obviously). I want the content to scale automatically so it fits in the webbrowser without having to scroll. Code: WebBrowser web = new WebBrowser(); System.Drawing.Rectangle workingRectangle = Screen.PrimaryScreen.WorkingArea; int heightWebcontrol = workingRectangle.Height / 100 * 85; int widthwebControl = workingRectangle.Width / 100 * 75; web.Size = new Size(widthwebControl,

Check browser tabs by JavaScript?

你。 提交于 2019-12-06 09:17:54
问题 Can I check if host page for a JavaScript is active by the browser's tab in IE7/FF/Opera? Checking other tabs than the page where this JS runs would probably be a security risk though.. My other option is a method I remember by prototype to check if the mouse cursor is active, but it's not that accurate. 回答1: You can attach the onBlur and onFocus events to the window ; that will tell you if you have focus or not. I have tested this and it works. You cannot check another page, but you can

webbrowser encoding problem

…衆ロ難τιáo~ 提交于 2019-12-06 09:04:36
I am using a WebBrowser control in my project. My code example is below: webBrowser1.Navigate("Web Site goes here"); The web browser is navigating the Google website, however I can not see the Turkish characters. Therefore I use: webBrowser1.Document.Encoding = "UTF-8" However the problem still continues. Any idea to solve this? StreamReader sr = new StreamReader(this.webBrowser1.DocumentStream, Encoding.GetEncoding("UTF-8")); string source = sr.ReadToEnd(); or you can try "iso-8859-9" for encoding. this should do it. This was really helpful. I was stuck with this for a while and managed to

Using jQuery in WinForms desktop app?

别说谁变了你拦得住时间么 提交于 2019-12-06 08:50:59
问题 We have a WinForms desktop application that uses the .NET 2.0 framework WebBrowser control quite extensively for displaying HTML. The HTML may be simple, or quite complicated. It may reside on disk, or it may be written directly to the document property at runtime. I was wondering if anyone had any experience with using jQuery as a library for such desktop applications. Can i just reference the jquery.js file on disk, and use it just as if it were a web app? Are there any pitfalls that I need

How to get the Document's Title from a Web Browser control in wpf

a 夏天 提交于 2019-12-06 08:38:20
I have created a Web Browser control in a TabControl.I want to set the Header of the TabItem to the Document's title of the Web Browser. I used the following code in the Navigated Event of the WebBrowser dynamic doc = tabBrowser.Document; //tabBrowser is the name of WebBrowser Control tab.Header = doc.Title; //tab is the name of the Tab Item But this piece of code doesn't work as it should.The header changes only for a few site. How can i set the Header of the tabItem to the Document's Title Value? Here is the navigated function: public void tabBrowser_Navigated(object sender, System.Windows

Want to enable BHO in a WebBrowser Control embedded in a standard C# App

老子叫甜甜 提交于 2019-12-06 08:05:11
问题 I have a standard winforms C# app with a webbrowser control dragged onto it. We also have a C++ BHO that we generally interact with through COM when it runs inside IE7 or IE8. I don't see any way to tell the webbrowser control to load the BHO. The BHO doesn't show any GUI or anything, it just listens to the http traffic when used from IE. Any help would be greatly appreciated. Thanks. 回答1: BHOs are just COM objects who implement IObjectWithSite. You can just create a instance of your BHO,

TEmbeddedWB/TWebbrowser: window.external is an empty object but can call functions, why is it 'empty' in the first place?

偶尔善良 提交于 2019-12-06 07:43:15
问题 Usage case (some info first): I have made some HTML/CSS3/Javascript games that can run on different platforms in WebView/Embedded browser in a platform specific executable. I have designed it myself because I am tired of all the 'frameworks' that be around that told me how simple it is to use their framework. I don't need all the bloat of these frameworks with their impressive classes and stuff, it must be simple as ABC, right? Also because a webview is slower than native code, it must be

Windows phone - Avoid scrolling of Web browser control placed inside scroll viewer

為{幸葍}努か 提交于 2019-12-06 06:53:38
I have to show a web browser inside a scroll viewer in windows phone application, with these requirements : Web browser height should be adjusted based on its content . Web browser scrolling should be disabled , ( when user scrolls within web browser, scrolling of scroll viewer should take place ) Web browser can do pinch-zoom and navigate to links inside its content. How can I implement that? Any links or samples is greatly appreciated. I'm using code like this. Attach events to the Border element in the Browser control tree (I'm using Linq to Visual Tree - http://www.scottlogic.co.uk/blog