
Getting the name of an object
I believe the Name property of your control will return the name of the
control to the form at least. I'm not sure if the control can retrieve it's
own name. Perhaps you could add an event to the control that is raised
before showing the name that would allow the form to return the controls
current name to it. Hope that helps.
Aaron
"My post is only an opinion and comes without a guarantee. Try at your own
risk!"
Quote:
> Hi,
> I have created a usercontrol which acts as a simple slider. When
> right-clicking on the slider a simple dialog appears from which you can
> properties.
> I have created a new solution and a new project, added the control in the
> toolbox and dropped several onto a form.
> I have then changed the names of these sliders. When I right-click on the
> sliders I want the name of the slider of I right-clicked to appear as the
> title of my dialog.
> For example I have dropped 2 sliders onto a form and renamed them to
> Slider_Vertical, Slider_Horizontal. When I right-click on Slider_Vertical
> the dialog title I want to see is "Slider_Vertical Properties ".
> Any ideas??