Questions about Enum

J

Just Me

Solution contains 2 projects
One creates a usercontrol and the other
creates an executable.

I have the usercontrol on a form in the executable project

In the usercontrol I define
Public Enum ToolItemChecked As Integer
Addresses
Labels
InternetAddresses
End Enum

Friend Property ToolType() As ToolItemChecked
Get
ToolType = gToolType
End Get
Set(ByVal TypeOfTool As ToolItemChecked)
gToolType = TypeOfTool
End Set
End Property

In the form I Imports the namespace
and use this Enum. For example:


Friend gToolType As ToolItemChecked
It is undefined
How should I go about this?
 
H

Herfried K. Wagner [MVP]

Just Me said:
Solution contains 2 projects
One creates a usercontrol and the other
creates an executable.

I have the usercontrol on a form in the executable project

In the usercontrol I define
Public Enum ToolItemChecked As Integer
Addresses
Labels
InternetAddresses
End Enum

Friend Property ToolType() As ToolItemChecked
Get
ToolType = gToolType
End Get
Set(ByVal TypeOfTool As ToolItemChecked)
gToolType = TypeOfTool
End Set
End Property

In the form I Imports the namespace
and use this Enum. For example:

Friend gToolType As ToolItemChecked
It is undefined


Define the enumeration in a separate file or use
'UserControl1.ToolItemChecked'.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top