Hi All,
Say I have two controls Car and Driver.
How do get a Car control to reference a Driver control on the properties
tab? I'm not interested in changing Driver properties on assignment. I
just want to
use the reference to the Driver control at runtime.
Simply doing this doesn't work (the Driver property always says "None"):
public class Car: System.ComponentModel.Component
{
private Driver m_Driver = null;
public Driver MyDriver
{
get{ return m_Driver ; }
set{ m_Driver = value; }
}
}
Furthermore, how do you get notification of a Driver control removal from a
form? In Delphi, on assignment of a driver, I would ask the Driver control
to notify me when it is being destroyed. How do I do this in C#? I tried
messing with IComponentChangeService, but never could make anything work.
An example would be greatly appreciated.
Thanks,
Dave