How can I tell when a control is fully created



Hi

I'm having problems adding items to a list view, I'm getting an
occasional error and I suspect it is because items are been added
before (or while) the listview is added to the control, how can I tell
if the listview is fully created, and is there an event to catch this,
I've tried using a combination of HandleCreated & ParentChanged which
helps a bit but I still get the occasional error.

I'm confident the error is to do with either items been added either
during or before the control been added to the main form as if I
deliberately block the code from running until I'm 100% sure the
control is added I dont get any errors, what I'm looking for is a more
elegant way to be 100% sure that the control is created than waiting
for a set amount of time before assuming it must be created by now.

.



Relevant Pages

  • Re: How can I tell when a control is fully created
    ... Is the exception occurring during the creation of the ... ListView, or when adding Items to it? ... What triggers the "occasional error" and what is ... before the listview is added to the control, ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • Re: MX failure - going to A record
    ... through a OpenVPN connection. ... I suspect it's a name server problem, ... I'm not sure how to track down this occasional error. ...
    (comp.mail.sendmail)