I have developped an VB6 application on a W2000 machine. To establish the length of the TAB's in a listbox I use the SendMessage API call. Under W2000 it works perfect, but under W95 and W98 I get an "Illegal operation in module User.exe".
Here are the code:
----------------------------------------------
Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd
As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Public Sub TabStopsPlaatsen(lb As ListBox, listboxTabs() As Long)
'Plaats tabstops
x = SendMessage(lb.hwnd, &H192, UBound(listboxTabs) + 1, listboxTabs(1))
lb.Refresh
End Sub
----------------------------------------------------
Dim listboxTabs(1) As Long
listboxTabs(1) = 50
TabStopsPlaatsen lstContent, listboxTabs(), listboxScrolbarLengte
----------------------------------------------------
Is there a solution for my problem?
I'll would be very thankfull.
(Sorry for my bad English)
Here are the code:
----------------------------------------------
Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd
As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Public Sub TabStopsPlaatsen(lb As ListBox, listboxTabs() As Long)
'Plaats tabstops
x = SendMessage(lb.hwnd, &H192, UBound(listboxTabs) + 1, listboxTabs(1))
lb.Refresh
End Sub
----------------------------------------------------
Dim listboxTabs(1) As Long
listboxTabs(1) = 50
TabStopsPlaatsen lstContent, listboxTabs(), listboxScrolbarLengte
----------------------------------------------------
Is there a solution for my problem?
I'll would be very thankfull.
(Sorry for my bad English)