Webbrowser Help needed

Hey i was wondering how do you open IE's Internet options from my own browser? and also how can i keep the text in the url box updated each time i go to a new url?

Just one other thing dose any one know how i can open i new window in my own application ?. cheers

thanks.

[290 byte] By [SweptSquash] at [2007-12-24]
# 1

Get a new window: webBrowser1.Document.Window.OpenNew(string url, string windowOptions) Where:

windowOptions

A comma-delimited string consisting of zero or more of the following options in the form name=value. Except for the left, top, height, and width options, which take arbitrary integers, each option accepts yes or 1, and no or 0, as valid values.

  • channelmode: Used with the deprecated channels technology of Internet Explorer 4.0. Default is no.
    directories: Whether the window should display directory navigation buttons. Default is yes.
    height: The height of the window's client area, in pixels. The minimum is 100; attempts to open a window
    maller than this will cause the window to open according to the Internet Explorer defaults.
    left: The left (x-coordinate) position of the window, relative to the upper-left corner of the user's screen, in pixels. Must be a positive integer.
    location: Whether to display the Address bar, which enables users to navigate the window to a new URL. Default is yes.
    menubar: Whether to display menus on the new window. Default is yes.
    resizable: Whether the window can be resized by the user. Default is yes.
    scrollbars: Whether the window has horizontal and vertical scroll bars. Default is yes.
    status: Whether the window has a status bar at the bottom. Default is yes.
    titlebar: Whether the title of the current page is displayed. Setting this option to no has no effect within a managed application; the title bar will always appear.
    toolbar: Whether toolbar buttons such as Back, Forward, and Stop are visible. Default is yes.
    top: The top (y-coordinate) position of the window, relative to the upper-left corner of the user's screen, in pixels. Must be a positive integer.
    width: The width of the window's client area, in pixels. The minimum is 100; attempts to open a window smaller than this will cause the window to open according to the Internet Explorer defaults.


Keep the text in address bar updated: Handle the Navigated event in the web browser control. The event handler will hav a WebBrowserNavigatedEventArgs argument which in turn contains info on the new location in the Url property. For example in C#:

private void webBrowser_Navigated(object sender, WebBrowserNavigatedEventArgs e){

textBox1.Text = e.Url.AbsolutePath;

}

You may also handle the DocumentCompleted event which has a similar WebBrowserDocumentCompletedEventArgs argument which in turn contains a Url property. Same as previous example.


As for the Options dialog: Well, that's not possible from the webcontrol itself as far as i know! You will have to implement it using some other method.

MadAboutC# at 2007-8-31 > top of Msdn Tech,Windows Forms,Windows Forms General...
# 2
i know this may have been along time ago but the new window thing i've tryed but it dosen't work any other ideas?
SweptSquash at 2007-8-31 > top of Msdn Tech,Windows Forms,Windows Forms General...
# 3
Hi,

you can add the following line of code to access Internet Explorer Options

Shell("rundll32.exe shell32.dll,Control_RunDLL inetcpl.cpl,,0", 1)

fred79g at 2007-8-31 > top of Msdn Tech,Windows Forms,Windows Forms General...