Question

QUESTION 2 What comments would you ad to explain the purpose of the code below? How was this code created and when does it get called? private void calculateBTN,Clickiobject sender, EventArgs e) MessageBox.Showl Hello): For the toolbar, press AI T+E10 (POOr ALNIO
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Design

Form2.Designer.cs

namespace Movie_ticket
{
    partial class Form2
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.CalculateBTN = new System.Windows.Forms.Button();
            this.SuspendLayout();
            //
            // CalculateBTN
            //
            this.CalculateBTN.Location = new System.Drawing.Point(116, 83);
            this.CalculateBTN.Name = "CalculateBTN";
            this.CalculateBTN.Size = new System.Drawing.Size(75, 23);
            this.CalculateBTN.TabIndex = 0;
            this.CalculateBTN.Text = "Calculate";
            this.CalculateBTN.UseVisualStyleBackColor = true;
            //
            // Form2
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(462, 339);
            this.Controls.Add(this.CalculateBTN);
            this.Name = "Form2";
            this.Text = "Form2";
            this.ResumeLayout(false);

        }

        #endregion

        private System.Windows.Forms.Button CalculateBTN;
    }
}

Coding:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Movie_ticket
{
    public partial class Form2 : Form
    {
        public Form2()
        {
            InitializeComponent();
        }
        /* This will call when when you click on button here you can see the code*/
        private void CalculateBTN_Click(object sender, EventArgs e)
        {
            MessageBox.Show("hello");
        }
    }
}

output:

if you still have any dout regarding this question please comment and if you like my code please appreciate me by thumbs up thank you.........

Add a comment
Know the answer?
Add Answer to:
QUESTION 2 What comments would you ad to explain the purpose of the code below? How...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • What comments would you add to explain the purpose of the code below? How was this...

    What comments would you add to explain the purpose of the code below? How was this code created and when does it get called? private void configureBTN_Click(object sender, EventArgs e) { userMessageLBL.Enabled = userMessageTXT.Enabled; }

  • . What comments would you add to explain the purpose of the code below? How was...

    . What comments would you add to explain the purpose of the code below? How was this code created and when does it get called? private void fileNameLST_SelectedIndexChanged(object sender, EventArgs e) { attachmentDialog.ShowDialog(); msgTXT.Text = attachmentDialog.SafeFileName; }

  • Hello everybody. Below I have attached a code and we are supposed to add comments explaining...

    Hello everybody. Below I have attached a code and we are supposed to add comments explaining what each line of code does. For each method add a precise description of its purpose, input and output.  Explain the purpose of each member variable. . Some help would be greaty appreciated. (I have finished the code below with typing as my screen wasnt big enough to fit the whole code image) } public void withdrawal (double amount) { balance -=amount; }...

  • Project 2 – Memory Match Game Purpose This Windows Classic Desktop application plays a simple matching game. The game si...

    Project 2 – Memory Match Game Purpose This Windows Classic Desktop application plays a simple matching game. The game simulates a card game where the cards a placed face down and the player flips over pairs of cards in an attempt to find matching cards.   Program Procedure Display a 4x4 grid of “face down” cards. Assign the letters A through H randomly to the cards in pairs. Allow the user to click on a card to “flip” it over and...

  • C# C# Please leave commentary next to the code explaining what it does/ a WPF program that is sti...

    C# C# Please leave commentary next to the code explaining what it does/ a WPF program that is still missing a file called Course.cs that defines a C# class called Course. Instances of the Course class are created and manipulated in the code behind of the WPF MainWindow window to allow the user to select courses of study and then update a list of selected courses.method that overrides the ToString() in order to be able to be displayed in a...

  • In an essay of 400 words, address each element below: - What is the purpose of...

    In an essay of 400 words, address each element below: - What is the purpose of the ASP.NET engine? - What software packages must be installed to serve ASP.NET web pages from a computer? - What does the @Page directive do? Does it get rendered to the browser? - What is the name of the event handler you would use to have code execute each time the ASP.NET web page is loaded? - When you are adding a new Web...

  • Im struggling with my final assignment and I don’t know how to start. The code has...

    Im struggling with my final assignment and I don’t know how to start. The code has to be done in python using tkinter module. I would very appreciate the help thank you QUESTION 1 Write a program that counts the number of names on a list. The program must include a class named FinalProjectlastName with the following attributes (class variables) and functions: Name: FinalProjectLastName Attributes: names: list of strings that stores names count: number of names on the list. Functions:...

  • Recall the IuregeList ADI wose interface is reproduced below. (Comments are included to rewind you what...

    Recall the IuregeList ADI wose interface is reproduced below. (Comments are included to rewind you what each method does) publie interfsceIntegertistInterface public boolean 1Euptyt) zeturntue iet i1st haa no elenenta public int sizet public int get lint index): zeturn liat element at index pubiie wosd add(int index, int newicey nsert neuiten at index pablic voad renove (int index)ideleze element a public road renoveRlOeet list to empty state zeturn nunber of elements in list t index 2. Write a static void...

  • Need help writing Java code for this question. CircleFrame class is provided below. what happen after...

    Need help writing Java code for this question. CircleFrame class is provided below. what happen after u add the code and follow the requirement? It would be nice to be able to directly tell the model to go into wait mode in the same way that the model's notify method is called. (i.e. notify is called directly on the model, whereas wait is called indirectly through the suspended attribute.) Try altering the the actionPerformed method of the SliderListener innner class...

  • Comments used to document code should: A. be used as little as possible B. be insightful...

    Comments used to document code should: A. be used as little as possible B. be insightful and explain what the instruction's intention is C. only be included in code that is difficult to understand D. be used to define variables whose names are not easy to understand E. not be included with the program 2 points    QUESTION 2 The main method for a Java program is defined by: A. public static main( ) B. public static main(String[ ] args);...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT