473,770 Members | 1,899 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

web browser in a windows form

Does anyone know how to add a web browser to a Windows Form?

thanks,
The Bear

Nov 16 '05 #1
3 1655

"The Bear" <bu**********@h otmail.com> wrote in message
news:34******** ************@ne ws20.bellglobal .com...
Does anyone know how to add a web browser to a Windows Form?


Microsoft.mshtm l

http://msdn.microsoft.com/library/de...mldomfromc.asp
--
Alex Moskalyuk
_______________ ______________
http://www.techinterviews.com
Nov 16 '05 #2
You may want to look into using the shdocvw.dll native COM server as well.

******** RBisch - C# enthusiast
****** ryanbischoff@PL ZyahooNO_SPAM.c om
:)
"The Bear" <bu**********@h otmail.com> wrote in message
news:34******** ************@ne ws20.bellglobal .com...
Does anyone know how to add a web browser to a Windows Form?

thanks,
The Bear

Nov 16 '05 #3
N.K
(1)

C:\>aximp c:\winnt\system 32\shdocvw.dll
Generated Assembly: C:\SHDocVw.dll
Generated Assembly: C:\AxSHDocVw.dl l
(2) Add reference to AxShDocVw.dll in your windows form project

(3) Use it !

For e.g,
protected AxSHDocVw.AxWeb Browser axWebBrowser;
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeCompo nent();
_is_navigation_ i_p = false;

//
// TODO: Add any constructor code after InitializeCompo nent call
//

// Navigate to the desired url.
object nullobj = null;
//string url =
"http://localhost.us.de ll.com/symphony/Start.aspx?"; //homePage;
//string url= ConfigurationSe ttings.AppSetti ngs[_parentApp.Appl icationName
];

this.axWebBrows er = new AxSHDocVw.AxWeb Browser();
//object opt = this.axWebBrows er.Document;
((System.Compon entModel.ISuppo rtInitialize)(t his.axWebBrowse r)).BeginInit() ;

this.axWebBrows er.Enabled = true;

((System.Compon entModel.ISuppo rtInitialize)(t his.axWebBrowse r)).EndInit();

// Make the browser control fill the entire client area.
axWebBrowser.Do ck = DockStyle.Top;
this.Controls.A dd( this.axWebBrows er );

// Finally, show the browser control.
this.axWebBrows er.Show();

}
axWebBrowser got methods like .Navigate ...
Cheers
Nirmal
"The Bear" <bu**********@h otmail.com> wrote in message news:<34******* *************@n ews20.bellgloba l.com>...
Does anyone know how to add a web browser to a Windows Form?

thanks,
The Bear

Nov 16 '05 #4

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

Similar topics

13
9460
by: Kai Grossjohann | last post by:
It seems that Ctrl-N in Mozilla opens a new empty browser window. That's fine, I don't need to do anything about it. But Ctrl-N in IE appears to clone the current window. Is there a way to intercept the key so that I can do stuff on the server side to make the new window behave correctly? (We have a JSP-based webapp which stores state in the session. Now if two windows access (and modify!) the same session, then madness will result....
16
2874
by: Java script Dude | last post by:
To all Mozilla JS Guru's (IE dudes welcome), I have spent the last three years developing complex DHTML applications that must work in IE 5.5sp2+ but I use Mozilla 1.3+** to do all my development. I have build some cross browser debuggers so my users can send me verbose debug dumps. I have some success but have come to a roadblock with the basic underlying JavaScript models. The only way to get a complete stack in IE is to use the...
4
6387
by: John Bowman | last post by:
Hi, How can I disable the right click capability of the Web Browser control that's on a form? I only want it to display the HTML, w/ no popup menu. TIA, -- John C. Bowman
14
2832
by: Nick K. | last post by:
I am looking for architecture to push information from a server to a client browser. This information would be in the form of an alert. What I do not want to do is have the browser be on a timer and update every few seconds. What options do I have to put into place such a feature?
3
1514
by: Steve Richter | last post by:
Is it possible to code a windows .net desktop application so that it behaves like an asp.net / browser application? Where the window form would not have x,y coordinate limits and would have horizontal and vertical scroll bars for the user to view all the content of the form? And the form engine itself is able to interpret and render an HTML input stream so that all the asp.net web and html controls could be used to place information...
2
1319
by: ae | last post by:
Does anybody know how to properly close the form, on a browser, and then exit out of the browser? I looked at MSDN and found nothing there.
4
23732
by: Peter Larsen | last post by:
Hi, I want to be able to show a file browser embedded on a form - a browser which is similar to the browser you get by SHBrowseForFolder(). Is that possible ? Thank you in advance. BR Peter Larsen
5
2069
by: jeremy | last post by:
I have an ASP.Net 2.0 application running on Windows Server 2003. The application displays properly in Internet Explorer, however, when I use a browser control embedded in a .net form, I get an error and am directed to the Windows Application Event Log. The following message is logged: ------------- Source: ASP.NET 1.1.4322.0 Event ID: 1062
2
10396
by: Lyle Fairfield | last post by:
I am using Microsoft’s Web Browser Control embedded on an Access Form to browse a specific site. I have a good reason for doing so; the pages on this site run code which aborts their display unless their window is the top window; they also treat all child windows as not-logged in windows. So I have not accomplished what I want with HTA’s or IFrames or Pop-Up Windows. But the Access Form/MS Web Browser combination gives me a top window with...
0
10254
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...
1
10036
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
7451
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
6710
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
5354
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...
0
5481
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
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
3607
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2849
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.