Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SendMessage API -Call gives "illegal operation in user.exe" by W95

Status
Not open for further replies.

JohanM

Programmer
Jul 21, 2000
3
NL
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)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top