A Basic Pythagoras Implementation in VB6

Category:
Dates and Math
Type:
Snippets
Difficulty:
Beginning
Author:
Anonymous

Version Compatibility: Visual Basic 6, Visual Basic 5

More information:
With three textbox controls and only two of them populated with a value, this code will calculate the length of whichever textbox is left empty. Using 3 and 4 as the two sides, making 5 as the hypotenuse, is a simple test. This code is written simply for beginners.

Instructions: Copy the declarations and code below and paste directly into your VB project.

Declarations:

Code: