Custom Control Instance Name

  • Thread starter Thread starter BluDog
  • Start date Start date
B

BluDog

Hi

I have a custom control that displays text, I am trying to work out
how to access the name of the instance of the control to display at
design time (similar to TextBox). The name property returns the
Control name rather than the instance e.g. MyControl rather than
MyControl1.

Any ideas?

Thanks

Blu.
 
Me.GetType.ToString ?



--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing
 
Sorry, read you wrong, you wanted the Instance not the Control Type.
--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing
 
"IComponentChangeService" could help you (ce.OldName / ce.NewName)
(have a look at my reply to "Re: How to get a usercontrol to automatically add code to the initialization code in a form...")

"Reflection" could also be an option.
(have a look at my reply to "Re: Reflection...")



Michael
 
"IComponentChangeService" could help you (ce.OldName / ce.NewName)
(have a look at my reply to "Re: How to get a usercontrol to automatically add code to the initialization code in a form...")

"Reflection" could also be an option.
(have a look at my reply to "Re: Reflection...")

Thanks, the thing that interests me about this problem is the fact
that when the custom control is added to the form the automatic name
(e.g. MyControl1) is added correctly, as with any other form, however
the Name property of the control returns the Type Name rather than the
control instance name...

Cheers

Blu
 
Have you tried this in C# ?, maybe its a bug

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing
 
Back
Top