Hi, I have a simple windows form. The form is named Container.vb and inside it is a class. When I put it in a namespace like so:
[/SIZE]
it doesn't work, it says: Error 1 Name 'InitializeComponent' is not declared.
If I remove the namespace, I get this:
Error 2 'Container' is a type in 'SmartClient' and cannot be used as an expression.
Ideas?
Thanks!
James
VB.NET:
[/COLOR][SIZE=2]
[COLOR=black]Namespace[/COLOR][/SIZE][SIZE=2][COLOR=black] Shell.UI[/COLOR]
[/SIZE][COLOR=black][SIZE=2]Public[/SIZE][SIZE=2] [/SIZE][SIZE=2]Class[/SIZE][SIZE=2] Container : [/SIZE][SIZE=2]Inherits[/SIZE][/COLOR][SIZE=2][COLOR=black] System.Windows.Forms.Form[/COLOR]
[/SIZE][COLOR=black][SIZE=2]Private[/SIZE][SIZE=2] parentWorkItem [/SIZE][SIZE=2]As[/SIZE][/COLOR][SIZE=2][COLOR=black] Shell.UI.Workitems.Workitems[/COLOR]
[COLOR=black]<InjectionConstructor()> _[/COLOR]
[/SIZE][COLOR=black][SIZE=2]Public[/SIZE][SIZE=2] [/SIZE][SIZE=2]Sub[/SIZE][SIZE=2] [/SIZE][SIZE=2]New[/SIZE][SIZE=2](<ServiceDependency()> [/SIZE][SIZE=2]ByVal[/SIZE][SIZE=2] workItem [/SIZE][SIZE=2]As[/SIZE][SIZE=2] WorkItem, [/SIZE][SIZE=2]ByVal[/SIZE][SIZE=2] workItemTypeCatalog [/SIZE][SIZE=2]As[/SIZE][/COLOR][SIZE=2][COLOR=black] IWorkItemTypeCatalogService)[/COLOR]
[/SIZE][SIZE=2][COLOR=black]Try[/COLOR]
[/SIZE][SIZE=2][COLOR=black]InitializeComponent()[/COLOR]
[/SIZE][SIZE=2][COLOR=black]Me[/COLOR][/SIZE][SIZE=2][COLOR=black].parentWorkItem = workItem[/COLOR]
[/SIZE][SIZE=2][COLOR=black]Catch[/COLOR]
[/SIZE][SIZE=2][/SIZE][COLOR=black][SIZE=2]End[/SIZE][SIZE=2] [/SIZE][SIZE=2]Try
[/SIZE][/COLOR][SIZE=2][/SIZE][COLOR=black][SIZE=2]End[/SIZE][SIZE=2] [/SIZE][SIZE=2]Sub
[/SIZE][/COLOR][SIZE=2][/SIZE][COLOR=black][SIZE=2]End[/SIZE][SIZE=2] [/SIZE][/COLOR][SIZE=2][COLOR=black]Class[/COLOR]
[COLOR=black]End[/COLOR][/SIZE][COLOR=black][SIZE=2] [/SIZE][SIZE=2]Namespace
it doesn't work, it says: Error 1 Name 'InitializeComponent' is not declared.
If I remove the namespace, I get this:
Error 2 'Container' is a type in 'SmartClient' and cannot be used as an expression.
Ideas?
Thanks!
James