views:

39

answers:

3

I am creating a browser and I am supposed to provide an option for the user to set his homepage. I have created a tabbed browser. Can anyone suggest me what to do?

Thank you

+1  A: 

Put a field in your configuration for the browser called UserHomePage, and be able to store a URL in it.

When the user is on a website, and uses your menu/buttons to Set as HomePage, store the current URL in the UserHomePage field.

When the browser is first opened, go to that URL.

If someone clicks the HOME button, go to that URL.

Raj More
That was a quick response! Thank you. I got what you are saying, but not completely. Can you please show me a sample code.
+1  A: 

Setup a properties window with a text box asking for user's home page url; save it somewhere accessible in future. When user click on the Home button of your browser, retrieve the url and navigate to that site.

KMan
A: 

Hey I got it... //declared public string "sString" //"Set homepage" is a tool strip. Stored textboxURL in sString. //Home is a tool strip button.Navigated it to sString.

public string sString;

    private void setHomepageToolStripMenuItem_Click(object sender, EventArgs e)
    {
        sString = urlTextBox.Text;
        string home = "http://" + sString;            
    }

private void homeToolStripButton_Click(object sender, EventArgs e)

    {
        ((WebBrowser)tabControl.SelectedTab.Controls[0]).Navigate(sString);
    }

Thank you "Raj More" and "KMan" for helping me.