yosef
Dec 10th, 2000, 06:41 AM
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 -
Dim operator As EventDispatcher
where event-dispatcher is a class in my project.
operator is set to new EventDispatcher by Form1.
User control -
Dim WithEvents listener as EventDispatcher
Private SubUserControl_Initialize()
set listener = operator
End Sub
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.
Thanks.
Yosef Meller.
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 -
Dim operator As EventDispatcher
where event-dispatcher is a class in my project.
operator is set to new EventDispatcher by Form1.
User control -
Dim WithEvents listener as EventDispatcher
Private SubUserControl_Initialize()
set listener = operator
End Sub
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.
Thanks.
Yosef Meller.