procedure TForm1.ListBox1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if button = mbright then
sendmessage(listbox1.handle, wm_lbuttondown, 0, y shl 16 or x);
end;
procedure TForm1.ListBox1MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if button = mbright then
sendmessage(listbox1.handle, wm_lbuttonup, 0, y shl 16 or x);
end;