How to Auto Count TextBox in Visual Basic 6


1

This article discusses about creating a program to automatically calculate TextBox in Visual Basic 6. Visual Basic 6 is a desktop-based Visual Basic programming language that was successful in the 1990s – 2000s. Indeed, this programming language does not require hardware specifications that are so high. For now, it is possible that people rarely make Desktop-based applications with Visual Basic 6. However, this programming language is still applied in related programming courses in several campuses.

This programming language can be said to be easy to learn by anyone who wants to enter the world of Desktop App programmers with Visual Basic 6 because there are not too many OOP or PBO system games. You can apply the OOP or PBO system in making programs with Visual Basic 6.

The author provides a tutorial to automatically calculate the TextBox when typing numeric data using Visual Basic 6. This is often used to calculate totals or accumulations, look for discounts (discounts), look for profits, and other calculations. The event that is used to automatically calculate the TextBox when typing numeric data is Change().

STEPS

1. Activate Microsoft Visual Basic 6.0.

2. Click Standard EXE to create a new project.

3. Make a design to calculate automatically by using several TextBoxes without the help of Command (the term Button in Visual Basic 6).

4. Double for the Text2-specific TextBox component to be given the command code to calculate automatically.

5. Enter the command code into Text2_Change

Text3 = Val(Text1) + Val(Text2)

6. Double for the TextBox component specifically Text1 to be given the command code to calculate automatically.

7. Enter the command code into Text1_Change

Text3 = Val(Text1) + Val(Text2)

8. Return to the Designer view, click the Run icon.

9. Display results for typing numbers in Text1.

10. Display results for typing numbers in Text2.

Finished.

Now, you can create a program to automatically calculate in a TextBox according to your needs in making Desktop-based applications using Visual Basic 6. Not only can you automatically calculate in addition operations like in this tutorial, you can also automatically calculate subtraction, multiplication, and division. , discounts, decimal multiplication, and so on according to the needs of the command code.

ATTENTION

When running a program in Visual Basic 6, the program or project is not automatically saved as a whole. So, you have to save the project or app manually.

CLOSING

You can learn to create desktop-based programs or applications to automatically calculate from TextBox when typing in the TextBox as well as in Visual Basic 6. Although, this programming language can be said to be old school. State, there are still many courses or campuses that still use Visual Basic 6 as related courses such as Visual Programming, Desktop Programming, and relevant courses.

READ OTHER ARTICLES

Leave a comment

Your email address will not be published.