473,804 Members | 2,191 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 5171
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
2696
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
12638
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
3073
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
3777
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
3268
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
9715
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
9595
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10352
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
10354
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,...
0
9175
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7642
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
5535
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4313
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
2
3835
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.