Huh???

Would an expert please explain to a simple programmer (me) the
difference between:
  if SendMessage(Listbox1.Handle, LB_GETITEMDATA, Listbox1.Items.Count,
0) > 0 then Listbox1.Selected[0] := false;
and 
  if Listbox.Items.Count > 0 then Listbox.Selected[0] := false;


-----Original Message-----
From: Alistair George [mailto:[EMAIL PROTECTED] 
Sent: Friday, 2 July 2004 4:37 p.m.
To: [EMAIL PROTECTED]
Subject: [DUG] Listbox error

Found it - its a bug in Delphi 5 at least. Here is the cure:

procedure Tmainform.TabSheet2Show(Sender: TObject);
begin
  if SendMessage(Listbox1.Handle, LB_GETITEMDATA,
Listbox1.Items.Count, 0) > 0 then Listbox1.Selected[0] := false;
end;


_______________________________________________
Delphi mailing list
[EMAIL PROTECTED]
http://ns3.123.co.nz/mailman/listinfo/delphi

Disclaimer : This communication contains information that is confidential and the 
copyright of ensynergy Limited or a third party. If you are not the intended recipient 
of this communication please delete and destroy all copies and telephone ensynergy 
Limited on +64 9 3551591 immediately. If you are the intended recipient of this 
communication you should not copy, disclose or distribute this communication without 
the authority of ensynergy Limited. Any views expressed in this communication are 
those of the individual sender, except where the sender specifically states them to be 
the views of ensynergy Limited. Except as required by law, ensynergy Limited does not 
represent, warrant and/or guarantee that the integrity of this communication has been 
maintained nor that the communication is free of errors, virus, interception or 
interference.


_______________________________________________
Delphi mailing list
[EMAIL PROTECTED]
http://ns3.123.co.nz/mailman/listinfo/delphi

Reply via email to