How to Add a Tab Into a String on VB.NET

Written by alexander gokhfeld
  • Share
  • Tweet
  • Share
  • Pin
  • Email
How to Add a Tab Into a String on VB.NET
VB.NET string data type can include control characters for data tabulation. (Jupiterimages/Photos.com/Getty Images)

The Visual Basic for Microsoft .NET, or VB.NET, Framework programming language has a variety of built-in functions for the string processing. The VB.NET string functions return the results in the form of a number, such as the length of a string and a character position within the string function or a string. The CHR string function allows software developers to add escape, delete and tab control characters to a string by using their ASCII code. You need to use ASCII code 9 to add a tab into a string on VB.NET.

Skill level:
Easy

Other People Are Reading

Instructions

  1. 1

    Click the "Start" button in Windows and select "Microsoft Visual Basic" from the "All Programs" menu.

  2. 2

    Click "File" and "Open," and open the VB.NET program in which you want to add a tab into a string.

  3. 3

    Add the following code after the "public STRING" line in your VB.NET program:

    TextBox.Text = "State" + CHR(9) + "Capitol"

    This separates the "State" and "Capitol" variables with the "Tab" control character.

  4. 4

    Click "File," "Save" to save the VB.NET program.

Don't Miss

Filter:
  • All types
  • Articles
  • Slideshows
  • Videos
Sort:
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the eHow.co.uk site, you consent to the use of cookies. For more information, please see our Cookie policy.