the above works fine if placed in ambientchanged event of the usercontrol. However when I press f5 to compile and run the .ocx, vb opens the .ocx in internet explorer. Internet explorer does not detect the ambient changed event. If I place the .ocx on a user form in excel then the ambientchanged event triggers. It seems that this event only triggers on a user form, but I also need it to trigger ins omething like Internet Explorer as well. any thought?
Main Topics
Browse All Topics





by: abelPosted on 2009-04-16 at 02:53:53ID: 24155905
(I thought I remember that VB6 contained a single method for finding that you are in design time or not. According to this post I was wrong: http://visualbasic.about.c om/od/usev b6/l/blfaq 0012a.htm, which shows a complex way of dealing with runtime/design time.)
However, I think what you are after is the Ambient.UserMode property, which is True for runtime and False for design time. Not sure whether you are creating a UserControl, I think so, because you talk of a container. If so, you can access this property through UserControl.UserMode.
-- Abel --