webbrowser-control

What is the best way to embed Excel in c# application [closed]

旧街凉风 提交于 2019-12-08 02:14:56
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed last year . I want to embed MS Excel into my wpf C# application within a tabbed view, so that the user can utilise the real MS Excel (not a clone) to manipulate data generated within my application easily. What is the most effective way to embed Excel / Office applications into your .net

Importing a local HTML file/code into a WebBrowser

孤街浪徒 提交于 2019-12-08 00:55:46
问题 I'm trying to get a local HTML file to display within a WebBrowser in a VB.NET program. I'm using the code below, however it doesn't seem to work, and I can't figure out why: 'first method WebBrowser1.Navigate(@".\index.html"); 'second method HTML = "normal" WebBrowser1.Document.Body.InnerHtml = HTML The first method produces the error "" in the Debug console when I go to run it. If I try it with out the @ , I get an empty white page. If I change the address, however ,so I know its a broken

Create an application, with multiple view to the same Web application, but with different credentials?

谁说我不能喝 提交于 2019-12-08 00:08:05
问题 I want tp build a WPF (or Windows Forms if it can solve the problem) that can display simultaneously the same web page with different credentials (it's testing tool for a web application with complex user action flow). I have, by now, a very simple WPF app : <Window x:Class="TestTool.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="600" Width="800"> <Grid> <Grid.ColumnDefinitions>

Threading and webbrowser control

无人久伴 提交于 2019-12-07 23:33:15
问题 I'm very new to threading. I start a thread like this: Thread t_main; t_main = new Thread(main_building_stuff); t_main.Start(); And at some point, I want in the main_building_stuff to grap some data from an webpage that is loaded into an webbrowser controll in the main thread. I'm doing that with this piece of code: HtmlElement lit = webBrowser1.Document.GetElementById("buildqueue"); But that results in an error... InvalidCastException (specified cast is not valid) What is the proper way to

Is it possible to detect the DOM element tapped in a WP7 WebBrowser control?

☆樱花仙子☆ 提交于 2019-12-07 20:56:16
问题 Is it possible to detect the DOM elements under a spot the user taps on a website using the WP7 WebBrowser control? I would like to let the user identify certain sections of the rendered page. 回答1: Yes. This code works pretty well for me: private void button1_Click(object sender, RoutedEventArgs e) { // first define a new function which serves as click handler webBrowser1.InvokeScript("eval", "this.newfunc_eventHandler = function(e) { window.external.notify(e.srcElement.tagName); }"); //

Webbrowser: sequencing activites when no DocumentCompleted is fired by a link on hosted webpage

半腔热情 提交于 2019-12-07 18:56:52
问题 Given this method to work on a HTML page in a webbrowser: bool semaphoreForDocCompletedEvent; private void button12_Click(object sender, EventArgs e) { checkBox1.Checked = false; //unchecked if the NAvigating event is fired and Checked after DocumentCompleted is fired, only to have a visual reference on the Form HtmlDocument doc = Program.wb.Document; HtmlElement ele = doc.GetElementById("menuTable"); foreach (HtmlElement sub in ele.All) { if (sub.GetAttribute("href").Contains("something")) {

.Net How to get the ID of the clicked Element in a Webbrowser

我们两清 提交于 2019-12-07 18:14:26
问题 I want to get the HTML Id of the clicked Element in a Webbrowser. Example: If i click the Google Search button it should give me the HTML ID of the clicked element (in this case a button) How should i achieve that ? Edit: Webbrowser = The Web browser Control 回答1: If it's for a Web browser control, then this article explains how to do it: https://www.codeproject.com/Articles/32279/How-To-Tell-What-is-Clicked-in-a-WebBrowser-Contro First off, we need to translate the mouse coordinates on the

Spell checker in TWebBrowser (TEmbeddedWB) control

随声附和 提交于 2019-12-07 14:47:28
问题 Internet Explorer 10 has built in spell checker and it works just fine. I tried to create a small HTML page to test it with following contents: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML lang=en xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"><HEAD> <META name=GENERATOR content="MSHTML 10.00.9200.16721"></HEAD> <BODY spellcheck=true contentEditable=true style="MARGIN: 0.5em"> <P>Theze ara mispeled wordz</P> </BODY></HTML> All that is needed is to put properties

Create a SSL WebRequest with C#

隐身守侯 提交于 2019-12-07 14:32:08
问题 I'm making a code that reads the a page and downloads it contents programmatically, but it does not work same way as a browser. Note that I'm also using cookies string. my code is: string strUrl = "http:" + "//mgac.webex." + "com"; string cookies_str = "vSeg=post_attendee; s_nr=1321305381566-New; s_lv=1321305381566; s_vnum=1322686800567%26vn%3D1; galaxyb_wl=R2355168776; JSESSIONID=Qlq1TR7Hf09KTsGHr4vv2GnTFF0NGRlLmGyYmMvzY5M29pbZ8yNp!31020270; DetectionBrowserStatus=3|1|32|1|4|2; CK_LanguageID

VB.NET WebBrowser disable javascript

南楼画角 提交于 2019-12-07 14:22:53
问题 Is there a way to disable javascript webbrowser in vb.net? 回答1: works for me: Private Function TrimScript(ByVal htmlDocText As String) As String While htmlDocText.ToLower().IndexOf("<script type=""text/javascript"">") > -1 Dim s_index As Integer = htmlDocText.ToLower().IndexOf("<script type=""text/javascript"">") Dim e_index As Integer = htmlDocText.ToLower().IndexOf("</script>") htmlDocText = htmlDocText.Remove(s_index, e_index - s_index) End While Return htmlDocText End Function Private Sub