Computer Science, asked by mnbcj, 10 months ago

name any two properties of textbox and label ​

Answers

Answered by kritigupta40
1

Earlier you wrote a simple program which calculated (one of) the solutions of the quadratic equation. However, it is not in a very convenient format because in order to change the coefficients, a,b and c, you have to leave the run mode, and edit the actual basic code itself.

We are now going to learn a far more convenient way to change the values of a,b and c in the above VisualBasic project.

Make sure you are in edit mode, (still with the above project from the previous section) and click on the window containing Form1. Have a look at the left hand side of the VisualBasic Programming Environment window. You will see a number of icons in the Toolbox (including the Command Button icon which we have already used). Move the mouse over the button which looks like a white rectangle with ab| in it (don't click yet!). You should see the text "TextBox" appear as you move your mouse over it. Double click on this white rectangle icon now. You will now see this text box appear on your form. It is probably positioned in an inconvenient place on your form, so just drag it near to the top-left of your form.

Make sure that the text box you have just inserted on your form is highlighted. Now have a look near the bottom-right of the VisualBasic Programming window. You will see a table with two columns. This is the Properties table. In the (Name) row, you will see Text1. Change this to a. Further down in the Properties table, you will see the Text row. Delete the "Text1" which appears in this row (i.e. it is now empty).

What we have done is to set up an "input" box in your form into which you can put any value of a you like. Repeat the above procedure so that we have text boxes for both b and c as well as for a. (i.e. (i) double click on the text box icon, and (ii) in the Properties window, change the Name of the text box to b (or c), and make sure that the Text property is empty.)

Now double click on the Command1 button. This should take you to the code associated with this button which should be something like:

Answered by spandy102
0

Earlier you wrote a simple program which calculated (one of) the solutions of the quadratic equation. However, it is not in a very convenient format because in order to change the coefficients, a,b and c, you have to leave the run mode, and edit the actual basic code itself.

We are now going to learn a far more convenient way to change the values of a,b and c in the above VisualBasic project.

Make sure you are in edit mode, (still with the above project from the previous section) and click on the window containing Form1. Have a look at the left hand side of the VisualBasic Programming Environment window. You will see a number of icons in the Toolbox (including the Command Button icon which we have already used). Move the mouse over the button which looks like a white rectangle with ab| in it (don't click yet!). You should see the text "TextBox" appear as you move your mouse over it. Double click on this white rectangle icon now. You will now see this text box appear on your form. It is probably positioned in an inconvenient place on your form, so just drag it near to the top-left of your form.

Make sure that the text box you have just inserted on your form is highlighted. Now have a look near the bottom-right of the VisualBasic Programming window. You will see a table with two columns. This is the Properties table. In the (Name) row, you will see Text1. Change this to a. Further down in the Properties table, you will see the Text row. Delete the "Text1" which appears in this row (i.e. it is now empty).

What we have done is to set up an "input" box in your form into which you can put any value of a you like. Repeat the above procedure so that we have text boxes for both b and c as well as for a. (i.e. (i) double click on the text box icon, and (ii) in the Properties window, change the Name of the text box to b (or c), and make sure that the Text property is empty.)

Similar questions