We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
manage to adapt that solution to mine, so i added the following codes :
Private Declare Function SendMessageArray Lib "user32" Alias "SendMessageA" _
(ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Const EM_SETTABSTOPS = &HCB
' Set new tab stops (in dialog units)
' Note: Default tabs stops are every 32 dialog units
Sub SetTabStops(txtb As TextBox)
Const cMAX = 20
Const cSIZE = 16
If txtb Is Nothing Then Exit Sub
' Can't seem to pass the ParamArray to SendMessage, so copy it to array of long
ReDim a(cMAX) As Long
Dim t As Long
Dim tabcount As Long
tabcount = cMAX + 1
For t = 0 To cMAX
a(t) = (t) * cSIZE
Next
'Clear any existing tabs.
Call SendMessageArray(txtb.hWnd, EM_SETTABSTOPS, 0&, 0&)
'Set the tabs.
Call SendMessageArray(txtb.hWnd, EM_SETTABSTOPS, tabcount, a(0))
End Sub
since i can't award the points to nazdor (the original poster) and i also can't award the points to myself :)
so i'll award them to you.
thanks for your effort.
regards
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
your answer is not exactly what i wanted... then after scanning EE further, found the solution at
https://www.experts-exchange.com/questions/20230663/Set-TabWidth-Of-Richtextbox.html
manage to adapt that solution to mine, so i added the following codes :
Private Declare Function SendMessageArray Lib "user32" Alias "SendMessageA" _
(ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Const EM_SETTABSTOPS = &HCB
' Set new tab stops (in dialog units)
' Note: Default tabs stops are every 32 dialog units
Sub SetTabStops(txtb As TextBox)
Const cMAX = 20
Const cSIZE = 16
If txtb Is Nothing Then Exit Sub
' Can't seem to pass the ParamArray to SendMessage, so copy it to array of long
ReDim a(cMAX) As Long
Dim t As Long
Dim tabcount As Long
tabcount = cMAX + 1
For t = 0 To cMAX
a(t) = (t) * cSIZE
Next
'Clear any existing tabs.
Call SendMessageArray(txtb.hWnd
'Set the tabs.
Call SendMessageArray(txtb.hWnd
End Sub
since i can't award the points to nazdor (the original poster) and i also can't award the points to myself :)
so i'll award them to you.
thanks for your effort.
regards