UserControl behaviour at author-time design-time and run-time

G

Guest

Hi all,

Can a user control be written in such a way that it can behave differently
depending on whether it is being authored, being used on a form in VS2003 and
being used at runtime? If so, how does it tell the difference between these
environments?

I am developing a user control based on the ListView control that will
display a subset of the application event log, given a named event source.

In order to make the control show event log data in design-mode as well as
at run-time, I altered the constructor so that it would populate the ListView.

To avoid unwanted delay, the function that populates the ListView runs in
its own thread. Despite this, there is a significant delay when I switch from
code-view to design-view in a WinfForms app that uses this component, during
development. It takes about 15 seconds to switch views.

Is there anything I can do to avoid this. I am trying to deisgn the control
so that it looks the same at design time as it does at run-time.

Regards,
Ian.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top