Question

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;

}

0 0
Add a comment Improve this question Transcribed image text
Answer #1

The code does not do anything when button is clicked the userMessageLBL has property to enable that label but in userMessageLBL.enabled property assigned the value of userMessageTXT.enable which is nothing in meaning

like if assigning some variable to some value the result will something but in the above code assinging the value but the value is nothing. Enabled property has two boolean value which is true and false.

You can set the property to the textbox and the label to enable and disable like

userMessageLBL.Enabled = True
userMessageTXT.Enabled = True

or

userMessageLBL.Enabled = False
userMessageTXT.Enabled = False

Add a comment
Know the answer?
Add Answer to:
What comments would you add to explain the purpose of the code below? How was this...
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...

    . 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; }

  • QUESTION 2 What comments would you ad to explain the purpose of the code below? How...

    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

  • 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; }...

  • In the "Go" button add 15 random numbers in the array using a random number generator....

    In the "Go" button add 15 random numbers in the array using a random number generator. Remove the call to "SetToZero" and the code following. Remove the "SetToZero" method. Add Access Keys of your choice Assign an accept button Assign cancel button (Exit) Add a Button "Find Max" Write an appropriately named method that Accepts the array Finds the largest int and returns the value "Find Max" button click Calls above method Opens a MessageBox to display the returned value...

  • Looking for some help here: Edit GetPhoneData to add more input validation by setting ranges for...

    Looking for some help here: Edit GetPhoneData to add more input validation by setting ranges for values Brands (Samsung, iPhone, Google) Models (Galaxy, Note, 8, X, Pixel) Price ($0.01-$2000) Include a comment about your addition, you can be creative, add components (or not), individualize this. Extra Credit (Samsung must be paired to Galaxy or Note) 2 points Below is the code: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace Cell_Phone_Test {...

  • I am new to programming (2 weeks of playing with it) I have written code for...

    I am new to programming (2 weeks of playing with it) I have written code for a timer in Visual Studio 2013. I am wondering if someone can show me how to write code/what the code would look like in a MODULE1.vb. I was thinking that for this timer I could create MsgBox using a DO UNTIL LOOP that would pop up every 20 seconds that says "hurry up!" until 1 minute has passed. As I said I am just...

  • Here is my skeleton code to this C# assignement I need to add a few things,...

    Here is my skeleton code to this C# assignement I need to add a few things, Change the the switch to If and Else-If statements (and test it is still working here) Add a third "Submit" button called SubmitButton In your If and Else-If add a condition if city is Honolulu and SubmitButton is checked. Display "Honolulu is the best place to be this time of year! I wish I was there!". Add comments, including header. HELP PLEASE ASAP public...

  • WITH THIS CODE, ADD TO THE EXIT BUTTON THAT ALLOWS THE USER TO SEE UPON EXITING,...

    WITH THIS CODE, ADD TO THE EXIT BUTTON THAT ALLOWS THE USER TO SEE UPON EXITING, HOW MANY QUESTIONS THEY GOT RIGHT AND WRONG. Public Class Form1 Dim r As Random = New Random Dim no1, no2 As Integer Private Sub rdbAdd_CheckedChanged(sender As Object, e As EventArgs) Handles rdbAdd.CheckedChanged txtAnswer.Clear() txtAnswer.BackColor = Color.White no1 = randomInt() no2 = randomInt() lblOperation.Text = "+" txtNumber1.Text = no1.ToString() txtNumber2.Text = no2.ToString() End Sub Public Function randomInt() As Integer Return r.Next(20, 120) End Function...

  • Read the assembly code below; add comments to explain what each line of code is doing;...

    Read the assembly code below; add comments to explain what each line of code is doing; in one sentence, explain what this procedure is trying to accomplish new-proc: sll $a0, $a0, 24   srl $a0, $a0, 24   add $v0, $a0, $zero jr $ra

  • C# Temperature Converter Application: I have most of the application complete I just need only help...

    C# Temperature Converter Application: I have most of the application complete I just need only help with error messages. My instructor wants me to show four error messages inside an error message label (not a message box) and all of the error messages should appear inside error message label. The four error messages should appear when: 1: User enters data inside both Celsius and fahrenheit text boxes: “You should enter data in only one textbox. Press Clear to start over.”...

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