Problems with a C# Listbox

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hi,

I will fill a C# Listbox with the SendMessage WinAPI call.

The problem is, the listbox is filled with the text, but the itemscount is
0. The inner array of the listbox have the len 1, bat the itemvalue is not
set.

With a listbox in VB6 works the program fine.

What is my flaw ?

Thank's for the help.

Steffen

My programcode is:

[DllImport("user32.dll",EntryPoint="SendMessage")]
static extern bool SendMessage1(IntPtr hWnd,uint Msg, int wParam, string
lParam);

....
SendMessage1(listBox1.Handle,384,0,"Test");




.