Pythagoras in VB6
Category:Dates and Math
Version Compatibility: Visual Basic 6
This code snippet will calculate the longest side of a 90 degree triangle, or the diagonal of a square. All you need is two TextBox controls, a Label, and a CommandButton and this single line of code.
Instructions: Copy the declarations and code below and paste directly into your VB project.