Answer to Question #267692 in Algorithms for israel

Question #267692

Write an algorithm that creates a windows application that contains two TextBox objects and two Button objects. One of the TextBox objects and one of the buttons are initially invisible. The first textbox should be used to input a password. The textbox should be masked to some character of your choice so that the characters entered by the user are not seen on the screen. When the user clicks the first button, the second TextBox object and button object should be displayed with a prompt asking the user to reenter his or her password. Now the user clicks the second button, have the application compare the values entered to make sure they are the same. Display an appropriate message indicating whether they are the same.



1
Expert's answer
2021-11-18T15:16:53-0500
namespace Add_and_Multiply
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            int val1;
            int val2;
            val1 = Convert.ToInt32(textBox1.Text);
            val2 = Convert.ToInt32(textBox2.Text);
            label3.Text = Convert.ToString(val1 + val2); //after this line I tried putting the code to give me yellow color text and now I have so many errors:(
        }

        private void button2_Click(object sender, EventArgs e)
        {
            int val1;
            int val2;
            val1 = Convert.ToInt32(textBox1.Text);
            val2 = Convert.ToInt32(textBox2.Text);
            label3.Text = Convert.ToString(val1 * val2);
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }
    }

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS