private void button5_Click(object sender, EventArgs e)
{
    if (domainUpDown2.Text == "Battlefield: Bad Company 2")
    {
        Form2 form2 = new Form2();
        form2.ShowDialog();
    }
}                   
All that does is open a new blank form, but i need it to open a new form with a webbrowser in it so i can set it url dependent on the if 开发者_C百科statement..
Assuming your form2 has a WebBrowser control, and that it has a property you can set like this:
    public Uri WebLocation
    {
        set { webBrowser1.Url = value; }
    }
Then modify your code as follows:
private void button5_Click(object sender, EventArgs e)
{
    Form2 form2 = new Form2();
    if (domainUpDown2.Text == "Battlefield: Bad Company 2")
        form2.WebLocation = new Uri("http://badcompany2.yoursite.com");
    if (domainUpDown2.Text == "Some Other Item")
        form2.WebLocation = new Uri("http://someotheritem.yoursite.com");
    form2.ShowDialog();
}  
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论