• 0

C# Help


Question

Ok i'm using the beta of C# expressm and have a few questions. OK, first what I want to do is call up a form from the main form. IE: Click button ABC in form1, calls up form2.

Also, using the built in web browser control in C# Express 2005, how do you tell it to go somewhere without having a combobox or something. I want to click a button and have it go there. Thanks!

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

1) all you have to do is create an instance of form2 in form1 and use form2.ShowDialog() (if you only want the second form to be used while it is up) or form2.Show() (if you want to be able to use both forms at the same time). form2 is the name of the instance that you create, not the class's name.

2) when you handle the click even for a button that you are gonna use, just set the URL property and that is it. make sure that you set it equal to the Combo Box's Text property.

hope this helps,

STV

Link to comment
Share on other sites

  • 0
remember the difference between .Show() and .ShowDialog()

STV

The code after ShowDialog() won't be executed until the form is closed, so you can't do anything with your other form until the new one is closed.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.