I was wondering where on my computer I can find the dll file for the web browser control. The reason I need it is because I'd like to modify it for my own use, as I have found that being IE based, the webBrowser control doesn't give me everything I need, and I need to add various functions. Where can I find the dll for it?
Thanks.
System.Windows.Forms.WebBrowser is located in System.Windows.Forms.dll but this class is only the wrapper over IE engine, installed in the system. So you can't modify it as you need.
If you want to add your code, i advice to look on others engines, such as WebKit
the webBrowser control doesn't give me everything I need, and I need to add various functions
Webkit
should have everything you need. Since you're programming in C#, use a wrapper such as http://sourceforge.net/projects/webkitdotnet/ to add it to your form.
Related
I'm trying to use Webkit-Sharp to implement a simple HTML browser in my application. I'm using Microsoft Visual C# Express Edition with the hopes of eventually moving the code over to Linux under Mono.
My first step was to add references to all of the Webkit dll files.
Next, I went and added the WebKitBrowser controls to the toolbox in the standard way and dropped a WebKitBrowser control on my form (specifically, on a TabPage.
I added the needed using statements of using WebKit; and using Webkit.Interop; to my declarations. My webkitBrowser control is called myBrowserControl. As I understand it, I should be able to do things like
myBrowserControl.Navigate('http://www.google.com');
and the browser should take me to Google's homepage. But, for some reason, it doesn't understand what WebkitBrowser is. In my Form Designer code, I have the following line:
private WebKit.WebKitBrowser myBrowserControl;
and I am being told that WebKitBrowser doesn't exist in the WebKit namespace and I may be missing a reference to an assembly. But it doesn't seem like I am. Can anyone help me figure this out? I know I'm doing something simple wrong but I can't figure out what.
Thanks
Just posting in case someone else finds this.
Were you trying to drop a WebKit gtk control into a Winforms project? That doesn't work. You might possibly be able to do this if you're using gtk on windows, although I've heard no one has had any success getting webkit-sharp working in windows.
You could actually use the winforms browser control in windows, since there is a (now unsupported) winforms port in mono.
I have a .NET ActiveX/COM Object which has a WebBrowser control (among other controls such has buttons, etc) inside it.
This object seems to load fine, the buttons are displayed and working but, for some reason, the WebBrowser control doesn't show up!
Is there some limitation for this in IE (e.g., is IE afraid of something recursive, etc.)? Is there a way that I can overcome it?
Thanks in advance,
Zubrowka
FireBreath has a library called WebView that does this; I've tested it both in NPAPI based browsers and in ActiveX and it works just fine. There are many reasons why you may want to do this.
Since I don't know what you're doing, I can't tell you what you're doing wrong... but I can show you the source code that FireBreath uses to do it:
https://github.com/firebreath/FireBreath/blob/master/src/libs/WebView/Win/WebViewWin.cpp
This is in C++, but you might be able to find something useful from it. I don't use .net in the browser -- too much overhead -- but theoretically the same principles should apply.
Is it a way to embed my User Control into Windows Explorer? Please tell me if you have any resources about this.
Thanks,
Weipeng
While you can, and there are a number of examples of how to do this. I recommend that you do NOT create shell extensions in managed code.
There are a number of reasons for this. For example, you now have to pull the entire managed runtime into the shell namespace. This means your explorer instance will use a lot more memory than is necessary.
However, the single biggest reason is that you cannot control which version of the namespace might already be in the shell process space when your control is loaded. See this article for why it's a bad idea.
Does anyone know how to create an app similar to IETester tool .. I have IE9 installed in my system and I need to force the webbrowser control to use IE8 assemblies, that I have a local copy.
Any ideas??
Thanks in advance,
It is technically possible, as outlined in this MSDN Library article. Just create an empty file named app.exe.local where app is the .exe name of your main program. You must copy all of the IE8 DLLs into the same folder. Actually making this work strikes me as a bit of a headache, there are a lot of DLLs. You can see them getting loaded in the Output window when you run a dummy app with a WebBrowser on a machine with IE8. Project + Properties, Debug tab, tick "Enable unmanaged code debugging" to see the DLL paths.
You can't use the web browser control as you describe, however using the link in the previous answer you can use the .local mechanism or similar mechanism and directly accessing the COM object that WebBrowser wraps to accomplish what you're trying to do.
Check out this new article by Rick Strahl which shows how to make some registry changes that will force the webBrowser control to use different versions of the rendering engine.
I have been searching on the web for some example code on how we can write a custom ActiveX Control for use in Excel using .NET but so far I have found old articles suggesting that it is not supported.
The application we are building uses Excel as a report writer so we which to add some custom controls to the worksheets to provide a richer experience. From the research I have done so far it appears that some ActiveX Controls can only be hosted in IE and hence I need to ensure that any approach taken works with Excel as a host.
The link http://www.codeproject.com/KB/miscctrl/exposingdotnetcontrols.aspx mentions the following:
CAVEAT: As this support has been dropped from Beta2 of .NET, don't blame me if it fries your PC or toasts the cat.
Can anybody give me an indication if it is possible using .NET 1.1 and if so to any pointers on best practices?
Andrew Whitechapel writes about managed controls as ActiveX controls in Office documents. You can read his article here:
Using Managed Controls as ActiveX Controls
I would thought that you're out of luck, but did find this:
http://dotnetslackers.com/articles/csharp/WritingAnActiveXControlInCSharp.aspx
Gives me the willies... but it might just right for you.
Further information on creating ActiveX Controls using C# can be found below although these articles seem to use IE as a Hosting Container not Excel.
http://www.ondotnet.com/pub/a/dotnet/2003/01/20/winformshosting.html
http://www.codeproject.com/KB/miscctrl/exposingdotnetcontrols.aspx