|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
group enumerators so intellisense shows them in VB6?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 fdeckerNOSPAMM@aol.com wrote:
> enums. But I can't figure out how to get Intellisense. So If I do: You should see "Numbers" in the intellisense list plus any additional> > 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. enums you have defined. Are you not seeing this? <fdeckerNOSPAMM@aol.com> schrieb:
> But if I don't want hundreds of constants Use 'Numbers.<IntelliSense opens and you can select the constant>'.> 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: -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/> 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 <fdeckerNOSPAMM@aol.com> schrieb:
Show quoteHide quote > If I have several enums, I want to I don't think that grouping enumerations in a module is a good idea. > 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 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/>
Threading...
Copy / Paste, Excel To flexgrid On error resume next bug Public Structure An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in system.data.dll Holding down a key HELP: Problem Hosting the "Simplest" of VB.NET Apps Sendmessage problem help! detect if running on a terminal server Deleting files using wildcards |
|||||||||||||||||||||||