473,395 Members | 1,856 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

group enumerators so intellisense shows them in VB6?

Hi, If I do this in module myConstants.bas:

Global const One = 1
Global const Two = 2
Global const three = 3

Then in my code, all I have to do is:

if ThisConstant = myConstants. and when I type the dot, Intellisense
shows all of the constants. But if I don't want hundreds of constants
to have to search through, I have groups of constants and try to use
enums. But I can't figure out how to get Intellisense. So If I do:

Public Enum Numbers
One = 1
Two = 2
Three = 3
end enum

I can't do myConstants follows by the dot I don't see anything. I have
to know in advance I want an enum called "Numbers". I want it to work
like .NET where I can do:

myConstants.Numbers.Three Or something similar that lets me have
Intellisense to be able to know what my constants are. It doesn't do
any good to have a module full of enumerations and then have to open
the file to see which one you want. Thanks.

-F

Jul 17 '06 #1
4 1088
fd************@aol.com wrote:
enums. But I can't figure out how to get Intellisense. So If I do:

Public Enum Numbers
One = 1
Two = 2
Three = 3
end enum

I can't do myConstants follows by the dot I don't see anything.
You should see "Numbers" in the intellisense list plus any additional
enums you have defined. Are you not seeing this?

Jul 17 '06 #2
<fd************@aol.comschrieb:
But if I don't want hundreds of constants
to have to search through, I have groups of constants and try to use
enums. But I can't figure out how to get Intellisense. So If I do:

Public Enum Numbers
One = 1
Two = 2
Three = 3
end enum

I can't do myConstants follows by the dot I don't see anything. I have
to know in advance I want an enum called "Numbers". I want it to work
like .NET where I can do:
Use 'Numbers.<IntelliSense opens and you can select the constant>'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Jul 17 '06 #3
Hello, sorry I was not more clear. If I have several enums, I want to
know what their group is, not just intellisense for what the actual
enums under the group are. I need it to be like the .NET languages or
Borland languages. In other words:

Module1

Public enum Names
name = fred
name = john
end enum

Public enum Numbers
One = 1
Two = 2
end enum

What I would like is to be able to type something like
"Module1.Names.Fred". And I need intellisense at every dot. Instead,
I can't use Module1 followed by a dot. Nothing happens unless I use
"Global Const Fred", etc. If I do that, I can type Module1. and get a
list of every global constant, but they are not grouped logically. If
I use the enums, I can not see a way to type "Module1" followed by a
dot to see what my enums are. I must know in advance what my enums are
called. Without Intellisense, how do I know that there are enums
called "names" and "numbers"? That is what I need to find out. Then
once I find each enum, I need Intellisense to tell me what enums are
there. If I know I am looking for an enum called "Names", I can type
"Names. " and get a list of names. But I need a list of enums first.
Thanks.

Fred

Jul 17 '06 #4
<fd************@aol.comschrieb:
If I have several enums, I want to
know what their group is, not just intellisense for what the actual
enums under the group are. I need it to be like the .NET languages or
Borland languages. In other words:

Module1

Public enum Names
name = fred
name = john
end enum

Public enum Numbers
One = 1
Two = 2
end enum

What I would like is to be able to type something like
"Module1.Names.Fred". And I need intellisense at every dot.
I don't think that grouping enumerations in a module is a good idea.
Instead you may want to use a namespace declaration:

\\\
Namespace Foo
Public Enum Goo
...
End Enum

Public Enum Bar
...
End Enum
End Namespace
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Jul 17 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Peter van der Goes | last post by:
When a struct is created in C# and a parameterized constructor defined, the IntelliSense editor shows only the syntax for the parameterized constructor in tooltips, but not for the default...
6
by: Stefan Kronberg | last post by:
I'm working on a solution containing about 20 projects. Some of the projects contain class definitions that are used in other of the projects. Most of the time intellisense is working ok, i.e. if I...
1
by: Christopher W. Douglas | last post by:
I'm working in VB.Net, using Visual Studio 2003. I have a project, let's call it Foo, that contains common methods, forms, and objects I use in other projects. It compiles as Foo.dll, which I...
0
by: Kevin Ortman | last post by:
We recently ported our code from VSNET2002 to 2003 After migration, we noticed that several properties of one of our classes no longer pop up in intellisense ( the get_ set_ methods pop up, but...
1
by: Vera | last post by:
I have the following coded elements: 1. An interface 2. A baseclass implementing the interface 3. A subclass that inherits the baseclass and contains some extra properties and methods I use my...
12
by: Peteroid | last post by:
I was creating my application just fine for the last 3 weeks or so. Then, starting this morning, IntelliSense seems to be having problems. It goes into a locked 'Updating IntelliSense..." mode....
2
by: Shehab Kamal | last post by:
I have a C# .NET 1.1 solution that consists of 2 projects. The first project is a class library that has well formed XML documenation. In this project IntelliSense shows me the description of each...
1
by: Sin Jeong-hun | last post by:
IntelliSense is very helpful, but sometimes there are too many items on the pop-up list. For example, sometimes I just want to browse methods only. But the list shows everything including...
2
by: RSH | last post by:
I have a class file in my project that is just like all the other class files in the project. For some reason this class after instantiation does not show its Public Properties and Methods like...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.