
How-To... - Convert Decimal to Hexadecimal and Octal
Converting Decimal to Hex or Octal is much simplier than converting to Binary. Visual Basic has two Functions - Hex() and Oct() - suprisingly. The syntax is as follows:-
Hex(number)
Oct(number)
In this example, the contents of txtDecimal is used and the final answer is printed into txtAnswer. No source-code available on this page, but you can download the project file by clicking here.