473,804 Members | 2,139 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

triger intellesence for functions

is there a way to have intellesence give a list of options for each
parameter of a newly create functions. an example would be, using
messagebox.show . after you put in the message and label, you have a list of
different type of button styles(MessageB oxButtons.OKCan cel), then a list for
icon(MessageBox Icon.Warning).

i am attempting to create a common function for programs to use at work. i
am thinking it would be easier for the other programmers to use these
functions if i could some how use intellesence to give a list of options
that they can choose from a list when its appropriate to do so

thanks in advance
tony
Nov 20 '05 #1
4 1136
T Perkins,
When you define your function, define the parameter as an Enum.

Something like:

Public Enum CommonOptions
Option1
Option2
Option3
End Enum

Public Enum MoreCommonOptio ns
Option1
Option2
Option3
Option4
End Enum

Public Class Functions

Public Function Common(ByVal options As CommonOptions, _
ByVal moreOptions As MoreCommonOptio ns) As Integer

End Function

End Class

Notice that each enum can have the same values, however those values do not
mean the same thing.

Using the Flags attribute you can make the Enum 'multivalue'.

<Flags()> Public Enum AccessValues
Read = 1
Write = 2
Browse = 4
Delete = 8
End Enum

Then you can use Or to combine them:

Common(AccessVa lues.Read or AccessValues.Wr iter)

Hope this helps
Jay

"T Perkins" <sl******@hotma il.com> wrote in message
news:OH******** ********@TK2MSF TNGP11.phx.gbl. ..
is there a way to have intellesence give a list of options for each
parameter of a newly create functions. an example would be, using
messagebox.show . after you put in the message and label, you have a list of different type of button styles(MessageB oxButtons.OKCan cel), then a list for icon(MessageBox Icon.Warning).

i am attempting to create a common function for programs to use at work. i
am thinking it would be easier for the other programmers to use these
functions if i could some how use intellesence to give a list of options
that they can choose from a list when its appropriate to do so

thanks in advance
tony

Nov 20 '05 #2
Do like this:

Public Enum MyValues
Value1 = 1
Value2 = 2
End Enum

Public MyFunction(Inpu tValue As MyValues)

End Function

Calling the function will give the user option betweel Value1 or Value2

Regards
Fredrik Melin

"T Perkins" <sl******@hotma il.com> wrote in message
news:OH******** ********@TK2MSF TNGP11.phx.gbl. ..
is there a way to have intellesence give a list of options for each
parameter of a newly create functions. an example would be, using
messagebox.show . after you put in the message and label, you have a list of different type of button styles(MessageB oxButtons.OKCan cel), then a list for icon(MessageBox Icon.Warning).

i am attempting to create a common function for programs to use at work. i
am thinking it would be easier for the other programmers to use these
functions if i could some how use intellesence to give a list of options
that they can choose from a list when its appropriate to do so

thanks in advance
tony

Nov 20 '05 #3
thats exactly what im look for. it works great.... thanks
Nov 20 '05 #4
* "T Perkins" <sl******@hotma il.com> scripsit:
is there a way to have intellesence give a list of options for each
parameter of a newly create functions. an example would be, using
messagebox.show . after you put in the message and label, you have a list of
different type of button styles(MessageB oxButtons.OKCan cel), then a list for
icon(MessageBox Icon.Warning).

i am attempting to create a common function for programs to use at work. i
am thinking it would be easier for the other programmers to use these
functions if i could some how use intellesence to give a list of options
that they can choose from a list when its appropriate to do so


\\\
Public Enum MyEnum
Constant1
Constant2
Constant3
End Enum
..
..
..
Public Sub Foo(ByVal x As MyEnum)
Nov 20 '05 #5

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

Similar topics

5
3350
by: hokiegal99 | last post by:
A few questions about the following code. How would I "wrap" this in a function, and do I need to? Also, how can I make the code smart enough to realize that when a file has 2 or more bad charcters in it, that the code needs to run until all bad characters are gone? For example, if a file has the name "<bad*mac\file" the program has to run 3 times to get all three bad chars out of the file name. The passes look like this:
99
5933
by: David MacQuigg | last post by:
I'm not getting any feedback on the most important benefit in my proposed "Ideas for Python 3" thread - the unification of methods and functions. Perhaps it was buried among too many other less important changes, so in this thread I would like to focus on that issue alone. I have edited the Proposed Syntax example below to take out the changes unecessary to this discussion. I left in the change of "instance variable" syntax (...
1
741
by: Bob Rock | last post by:
Hello, in the last few days I've made my first few attempts at creating mixed C++ managed-unmanaged assemblies and looking aftwerwards with ILDASM at what is visible in those assemblies from a managed point-of-view I've noticed that: 1) for each managed and unmanaged C function (not C++ classes) I get a public managed static method (defined on a 'Global Functions' class) in the generated assembly with an export name of the form...
47
3887
by: Richard Hayden | last post by:
Hi, I have the following code: /******************************** file1.c #include <iostream> extern void dummy(); inline int testfunc() {
21
746
by: Rubén Campos | last post by:
I haven't found any previous message related to what I'm going to ask here, but accept my anticipated excuses if I'm wrong. I want to ask about the real usefulness of the 'inline' keyword. I've read many authors (and it's my belief, too) who discourage the use of the 'inline' keyword, because: - The 'inline' word only advice the compiler about wich functions should be expanded, but not force it to expand them. Also, the compiler can...
25
5424
by: Stijn Oude Brunink | last post by:
Hello, I have the following trade off to make: A base class with 2 virtual functions would be realy helpfull for the problem I'm working on. Still though the functions that my program will use a lot are the ones that are virtual and thus will slow down the calculation, at least that is what what I have read on several places on the internet. It makes sense the program has to work with some kind off lookup table for the virtual...
2
6533
by: Koen | last post by:
Hi all, I have a question about something rather common, but I'm a bit lost at the moment: Lat's say you have this: // in A.h Class A {
2
1183
by: Jerry C | last post by:
I am not getting intellesence in web.config any ideas. Visual Studio 2005, framework 2 , visual basic Thank you -- Jerry
7
3977
by: Immortal Nephi | last post by:
My project grows large when I put too many member functions into one class. The header file and source code file will have approximately 50,000 lines when one class contains thousand member functions. Is it normal how C++ Compiler can compile large class without any problem? Didn't C++ Compiler have rules to limit the number of member functions? One big object has complex operations how member variables and member functions can be...
0
9714
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9594
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10096
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9174
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7638
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6866
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5534
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5673
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3002
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.