The way you've described it "smells" a bit to me. Why do you need to free the combobox? Why not just hide it or something similar?
However, if you truly want to do it, look into posting a message to the form using PostMessage, and then handle the message on the form, and free the combobox at that point. C. -----Original Message----- From: delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz] On Behalf Of Robert martin Sent: Tuesday, 13 October 2009 10:23 a.m. To: NZ Borland Developers Group - Delphi List Subject: [DUG] tricky event question Hi Guys I have a combobox with an event (onChange) that refreshes the display. As part of that refresh the combobox is freed. This causes an AV as the combo box has not yet finished processing its event but is being freed. What would be the best way of dealing with this scenario? Cheers Rob _______________________________________________ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe _______________________________________________ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe