Determining 'mode' (i.e. run-time or design-time) of a UserControl

B

Brett

In VB, a UserControl could determine its run-time vs. design-time status by
evaluating the UserControl.Ambient.UserMode. For the life of me I can't
figure out how to do the same basic thing in VB.NET.

I have a UserControl in which I need to perform certain functions in the
Load event during run-time, but those same functions are not possible in
design time because other resources (i.e. database, registry, etc.) haven't
been initialized. I just want to skip that part if I'm in design-time. Am
I missing something obvious?

Thanks in advance,
Brett
 
C

Cor Ligthert

Brett,

Did you know that there is a newsgroup
microsoft.public.dotnet.languages.vb.upgrade

It is very inactive newsgroup, however Ken and Herfried are looking often
there if there are messages

I would in your case just crosspost this question too (sent one message to
both newsgroups)
microsoft.public.dotnet.languages.vb
as well.

I hope this helps

Cor
 

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