473,394 Members | 1,785 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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 1635

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


Microsoft.mshtml

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@PLZyahooNO_SPAM.com
:)
"The Bear" <bu**********@hotmail.com> wrote in message
news:34********************@news20.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\system32\shdocvw.dll
Generated Assembly: C:\SHDocVw.dll
Generated Assembly: C:\AxSHDocVw.dll
(2) Add reference to AxShDocVw.dll in your windows form project

(3) Use it !

For e.g,
protected AxSHDocVw.AxWebBrowser axWebBrowser;
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
_is_navigation_i_p = false;

//
// TODO: Add any constructor code after InitializeComponent call
//

// Navigate to the desired url.
object nullobj = null;
//string url =
"http://localhost.us.dell.com/symphony/Start.aspx?"; //homePage;
//string url= ConfigurationSettings.AppSettings[_parentApp.ApplicationName
];

this.axWebBrowser = new AxSHDocVw.AxWebBrowser();
//object opt = this.axWebBrowser.Document;
((System.ComponentModel.ISupportInitialize)(this.a xWebBrowser)).BeginInit();

this.axWebBrowser.Enabled = true;

((System.ComponentModel.ISupportInitialize)(this.a xWebBrowser)).EndInit();

// Make the browser control fill the entire client area.
axWebBrowser.Dock = DockStyle.Top;
this.Controls.Add( this.axWebBrowser );

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

}
axWebBrowser got methods like .Navigate ...
Cheers
Nirmal
"The Bear" <bu**********@hotmail.com> wrote in message news:<34********************@news20.bellglobal.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
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...
16
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...
4
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
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...
3
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...
2
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
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...
5
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...
2
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
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...
0
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,...
0
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...

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.