Hi.
How do I know if the UserControl I created runs is designtime or runtime? Currently it uses a variable defined in a different module, and it can't use it on designtime when the project is not running.
This is what I did:
Module1.bas -
where event-dispatcher is a class in my project.Code:Dim operator As EventDispatcher
operator is set to new EventDispatcher by Form1.
User control -
You see that in design-time operator is not set, and I don't want to set it manualy, because the operator must be the same object throughout the project and I can't re-initialize it whenever a control loads.Code:Dim WithEvents listener as EventDispatcher Private SubUserControl_Initialize() set listener = operator End Sub
Thanks.
Yosef Meller.




Reply With Quote