I am using VS2008 with both VB.NET and C#
I have created a simple custom user control and have added some public functions to it
my problem is that if I don’t drag and drop the user control from the toolbox onto a winform but instead I try to create one dynamically via code – I am not able to access the public functions and properties
I can’t understand why there would be a difference but htere seems to be.
would appreciate any help on the matter
thanks
You are defining your variable as type
UserControl. As such, intellisense is only going to show you the members of theUserControlclass, even if it is in fact of typemyCustomControl.Change your initial declaration to
myCustomControl myUC;and you should be good to go.