Visual Basics Add three comment lines before the line of code to explain: 1. wha
ID: 3908550 • Letter: V
Question
Visual Basics
Add three comment lines before the line of code to explain:
1. what the code is doing and
2. what the property is used for, and
3. whether that property can be changed using the Design time, Properties window.
For example:
'following line assigns the text property of a label named usernamelbl to a string value
'The text property of a label displays some text on the form
'The text property of a label is available in the properties window during Design time
usernamelbl.Text = "Enter your username"
Again, your code must be unique - do not duplicate a control or a property
Explanation / Answer
//A simple application with two buttons . clicking on one buttone will make the button visible on the button
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
' Set the caption bar text of the form.
'The text property of a form displays some text on the form
'The text property of a form is available in the properties window during Design time
Me.Text = "my.com"
' Set the visible property of the button.
'It makes the button visible or invisible
'The visible property of a form is available in the properties window during Design time
btn.visible = false
End Sub
Private Sub btnMoto_Click(sender As Object, e As EventArgs) Handles btnMoto.Click
' Set the visible property of the button.
'It makes the button visible or invisible
'The visible property of a form is available in the properties window during Design time
btn.visible = true
End Sub
End Class
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.