There are instruments (like Nikon Forestry [550 and Pro] laser rangefinders) that have these three instruments all built inside one device. The distance and the angle to the top are measured at the same time and the internal calculator does the mathematics to calculate the height. Even the adding of the height to the top and to the base can be done automatically.
If the tree has a broad crown or more than one top, it is important to scan all of the tops with the laser rangefinder to find the tallest. The top should be measured several times to be sure that the result can be repeated.