15 Using Functions in TextBoxes in Visual Basic .NET Part 1


1

Visual Basic .NET (VB.Net) programming language which is a programming language that is usually used to create desktop applications or websites. However, these programming languages ​​are more often used to create Desktop-based applications. For tools or software that is often used to create desktop-based applications with VB.Net, namely Microsoft Visual Studio.

The author provides 15 functions contained in the TextBox component with VB.Net in Microsoft Visual Studio part 1. This is where you can find out the usefulness of each function contained in the TextBox component which is very necessary for learning to create your own desktop-based application using Visual Basic. Net.

Coding for the use of the Function from VB.Net can only work when the desktop application program is running on a computer or laptop, whether it’s Debug, Run, or Publish.

A SET OF FUNCTIONS CONTAINED IN THE TEXTBOX

1. TextBox.Focus()

This function is used to provide a focal point for the TextBox which will input data the first time.

2. TextBox.Clear()

This function is used to clear the input text until it is empty.

3. TextBox.Hide()

This function is used to hide the TextBox component from the Form view.

4. TextBox.toString()

This function is used to convert character data from character data retrieval from other variables into TextBox (input text) into String data type directly.

5. TextBox.Copy()

This function is used to copy or duplicate text data in the TextBox (input text) field.

6. TextBox.Cut()

This function is used to move text data that is in the TextBox column (input text).

7. TextBox.Paste()

This function is used to enter text data that has been copied or cut in the selected TextBox (input text) column.

8. TextBox.Undo()

This function is used to cancel a command that has been done previously in the selected TextBox (input text) column.

9. TextBox.Enabled = [true atau false]

This function is used for management in typing text data to input text fields. If the value is TRUE, then the input text can be inputted and the text is blocked via the keyboard, either a computer or a laptop. Meanwhile, the value is FALSE, then the input text cannot be inputted and the text cannot be blocked via the keyboard.

10. TextBox.TextAlign = [0,1, atau 2]

This function is used to determine the layout in the input text field, either before, during, or after text data is typed by the keyboard. For the value of TextAlign which consists of 3 selected values, namely 0, 1, and 2. Each of these values ​​has its own meaning, namely.

0 = HorizontalAlignment.Left (make the layout of the text to the left.)

1 = HorizontalAlignment.Right (make the layout of the text right.)

2 = HorizontalAlignment.Center (Centers the layout of the text.)

11. TextBox.ReadOnly = [true atau false]

This function is used to determine in the execution of typing text data against the input text field. If the value is TRUE, then the input text can be inputted via the keyboard, either a computer or a laptop. Meanwhile, the value is FALSE, then the input text cannot be inputted via the keyboard.

12. TextBox.Text = “enter your own text”

This function is used to display character data from containers or other variables that have content / value into the input text field (TextBox). To display the text, it can be filled with text data using double quotes (“) or numeric or floating-point data without using double quotes (“).

13. TextBox.MaxLength = 7

This function is used to provide a maximum limit in the length of characters that can be typed by application users in the TextBox column. To specify the maximum character length limit, enter only numeric values. For example, you want the desktop application user to only be able to type 7 characters long, then you just enter the number 7 in the MaxLength.

14. TextBox.Multiline = [true atau false]

This function is used to give the size of the TextBox column width vertically (top-bottom). If the value is TRUE, then you can type text data into the input text field down to the bottom. Meanwhile, the value is FALSE, then you can type text data into the input text field until it is elongated.

15. TextBox.PasswordChar = “Enter one character only.”

This function is used to hide the contents of the actual text data in the TextBox column by providing a character code which is usually a symbol to cover the actual text data.

CLOSING

You already know the 15 functions or functions contained in the TextBox component, usually coding in making their own desktop-based applications using the Visual Basic.Net programming language.

Later, the author will write an article about 15 uses of each Function contained in the TextBox component with the VB.Net programming language part 2 in the near future.

Leave a comment

Your email address will not be published. Required fields are marked *