473,796 Members | 2,476 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

System.Windows. Forms.WebBrowse r and AxSHDocVw Differences

Joe
HI

Trying to figure out the difference between these 2 browser

I am embedding a MS office Document (Word/Excel) in a WebBrowser on a Form

With AxSHDocVw I can do the following to save the current document
object o = new object();
axWebBrowser1.E xecWB(SHDocVw.O LECMDID.OLECMDI D_SAVE,SHDocVw. OLECMDEXECOPT.O LECMDEXECOPT_DO NTPROMPTUSER,
ref o, ref o);

oDocument = null;

But Windows.Forms.W ebBrowser has no ExecWB method - I assume the Forms
webBrowser will be with DotNet v2.0 so I am assured it will

be on the pc - so I'd rather just it. How do I get a handle of the Document
within Windows.Forms.W ebBrowser to save the file???

Thanks
Dec 18 '06 #1
1 5170
Joe,

On a side note, you should pass Type.Missing.Va lue for the last two
arguments.

What you could do is call the ActiveXInstance property of the WebBrowser
control to get the ActiveX control.

You should also define the IWebBrowser2 interface somewhere in your code
(or, if you want, set a reference to the ocx which has the web browser
control).

Case the object returned by the ActiveXInstance property to the
IWebBrowser2.Ex ecWB method, and it will do what you want.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Joe" <hc******@yahoo .comwrote in message
news:%2******** **********@TK2M SFTNGP02.phx.gb l...
HI

Trying to figure out the difference between these 2 browser

I am embedding a MS office Document (Word/Excel) in a WebBrowser on a Form

With AxSHDocVw I can do the following to save the current document
object o = new object();
axWebBrowser1.E xecWB(SHDocVw.O LECMDID.OLECMDI D_SAVE,SHDocVw. OLECMDEXECOPT.O LECMDEXECOPT_DO NTPROMPTUSER,
ref o, ref o);

oDocument = null;

But Windows.Forms.W ebBrowser has no ExecWB method - I assume the Forms
webBrowser will be with DotNet v2.0 so I am assured it will

be on the pc - so I'd rather just it. How do I get a handle of the
Document within Windows.Forms.W ebBrowser to save the file???

Thanks


Dec 18 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1896
by: Jay | last post by:
Hi all, May i know if there is any way by which we can render a given HTML inside .NET Windows Forms? We had the Web Browser controls in Visual Studio 6. Is there a follow-up of that in VS.NET? Most recently, HTML rendered dialog boxes seemms to be in vogue. Can anyone please help?
7
4005
by: David Elliott | last post by:
I have created an application that will dynamically load other DLLs (plugins). The new plugin is a winform with an embedded IE Browser. I am wanting to have the form to run in its own thread. This would allow for other plugins and the main application to be free to do other work. I have written a little TestDriver for the plugin and am having some difficulty. If I don't use threads everything works just fine. If I do use threads, upon...
0
2695
by: Matthias Kwiedor | last post by:
Hi! I want to create a WebBrowser Control at runtime. So i ported the "at start creation" of the Control to a new routine. Everything works fine, but i implement the BeforeNavigateFix and a own Content Menu. For this i need this lines: public void create_new_browser()
4
3490
by: Supra | last post by:
I have a tab control in a which a few of the tabs include an AxWebBrowser browser control. Let say i have currently tabpage2 and i typed url in combobox when i pressed enter it doesn't display webbrowser instead i can do create new tab. ne one knows how to display currrently displayed regardless of tabpage(s)? here is code: Public Sub AddBrowserTab() AxWebBrowser1.Visible = False Dim newPage As TabPage = New TabPage(Text) ' Delcare and...
4
12637
by: Toma Marinov | last post by:
Hello ! I made some test with webbrowser control in VS.2005. When I load a word document in webbrowser through .Navigate method (from my hdd), I want to get the stream of the loaded doc file with .DocumentStream, but this property is null. The property .DocumentText is = "" too. Am I missing something ? Thank you very much !
5
3071
by: Boki | last post by:
Hi All, I am using webbrowser control, it is very often to happen: A first chance exception of type 'System.IO.FileNotFoundException' occurred in System.Windows.Forms.dll but sometimes works, all the same code, what's the problem...and how to resolve it...
2
6670
by: Qiang | last post by:
Hi, Anybody knows how to convert an instance of SHDocVw.WebBrowser to System.Windows.Forms.WebBrowser? Or is it possible? thanks, Qiang
3
3776
by: David | last post by:
I would like to use a AxSHDocVw.WebBroswer control in a Windows service- is this possible without creating a form? I added the reference I usually use to add this object in a Windows Application but only SHDocVw appears under References in the Solution Explorer. As an alternative, SHDocVw.WebBrowser may work but I am not sure how to add an event handler for it- does anyone know how to add a DocCompleted event for this object?
0
3267
by: =?Utf-8?B?Q29kZVJhem9y?= | last post by:
I am converting a windows application which contains a web browser control into an ASP.net application. The Windows project references all manner of html controls in the WebBrowser control and retrieves values using the HtmlControlCollection class etc. I was hoping I was going to be able to work with the Windows.Forms.WebBrowser object from inside my ASP.net webform by simply adding a reference to System.Windows.Forms and doing code...
0
9683
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10457
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10231
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10176
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7550
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6792
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5576
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4119
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2927
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.