If you want to add a control to a form, you can use the Toolbox on the left of Visual Studio. Move your mouse over to the Toolbox, and click the plus symbol next to Common Controls. You should see the following list of things that you can add to your form:
A button is something you want people to click on. When they do, the code you write gets executed. The text on the button, which defaults to "button1", can be changed. You can add anything you like here, but it should be something that's going to be useful for your users, such as "Open a text file", or "Calculate Now".
We're going to display a simple message box when the button is clicked. So we need to add some text to the button. You do this by changing something called a property. This is quite easy, and you'll see how to do it in the next part of this lesson.
No comments:
Post a Comment