RE: II AYUDA CON EL LISTBOX...
Const maxlen = 10 ´ Maximum expected string length in list box.
tabchar = Chr$(9) ´ ASCII code for a tab
ReDim a$(maxlen) ´ String array to right justify in list box.
form1.Show ´ Must Show form in Load event before Print
´ will become visible.
´ GetDialogBaseUnits() API function lets you calculate the average
´ width of characters in the system font.
bu& = GetDialogBaseUnits()
hiword = bu& \ (2 ^ 16) ´ 16 pixels high in default system font
loword = bu& And &HFFFF& ´ 8 pixels wide in default system font.
Print "System font width and height, in pixels: " & loword, hiword
´Assign the array of defined tab stops.
Static tabs(1 To maxlen) As Integer
For j = 1 To maxlen ´ Set tabs every 4 dialog units (one character):
tabs(j) = (loword * j) / 2
´ On most Windows systems, you need only this: tabs(j) = j * 4
Next
´Send message to the List1 control through the Windows message queue:
retVal& = SendMessage(List1.hWnd, LB_SETTABSTOPS, maxlen, tabs(1))
For j = 1 To maxlen
a$(j) = String$(j, "a") ´ Assign an arbitrary character string.
´ Add the appropriate number of tabstops to right justify:
tabstring = String$(maxlen + 1 - Len(a$(j)), Chr$(9))
List1.AddItem tabstring & a$(j)
Next
End Sub
4. Add the following Windows API declarations to the General Declarations section:
Declare Function GetDialogBaseUnits Lib