Private Declare Function SendMessage Lib "user32" Alias _
"SendMessageA" (ByVal hwnd As IntPtr, ByVal wMsg As _
Integer, ByVal wParam As Integer, ByRef lParam As _
Integer) As Integer
Private Const EM_SETTABSTOPS As Integer = &HCB
Private Sub Form1_Load(ByVal sender As System.Object, ByVal _
e As System.EventArgs) Handles MyBase.Load
Dim tabs() As Integer = {20, 130}
SendMessage(TextBox1.Handle, EM_SETTABSTOPS, 2, tabs(0))
Dim txt As String = ""
txt &= "Bacon Burger" & vbTab & "3.00" & vbCrLf
txt &= vbTab & "Tomato" & vbTab & "0.15" & vbCrLf
txt &= vbTab & "Extra Cheese" & vbTab & "0.20" & vbCrLf
txt &= "Large Fries" & vbTab & "0.99" & vbCrLf
txt &= "Medium Softdrink" & vbTab & "1.05" & vbCrLf
txt &= "" & vbCrLf
txt &= "Subtotal" & vbTab & "5.39" & vbCrLf
txt &= "Tax" & vbTab & vbTab & "0.38" & vbCrLf
txt &= "Total" & vbTab & vbTab & "5.77" & vbCrLf
TextBox1.Text = txt
TextBox1.Select(0, 0)
End Sub
|