Happy Friday, y'all!
I am creating a function and want to have IntelliSense pop down the list of valid options for a certain parameter in the same way that the MsgBox function behaves when you are typing your argument for which buttons you wish to include (such as MsgBoxStyle.OkCancel). I have done my best to search the internet but haven't found a thing which comes close to what I'm seeking. My monkeying around hasn't produced a satisfactory solution, yet, either.
A related additional thing, which I can live without but that would be nice to have, is the description of the current parameter, which appears below the function description as shown highlighted below
MsgBox (Prompt As Object, [Buttons as Microsoft.Visual Basic.MsgBoxStyle = MsgBoxStyle .DefaultButton1], [Title as Object = Nothing]) As Microsoft.VisualBasic.MsgBoxResult
Buttons:
Optional. Numeric expression that is the sum of values specifying the number and type of buttons to display, the icon style to user, the identity of the default button, and the modality of the message box. If you omit Buttons, the default is zero.
This is my first post. I'm relatively new to VB .Net. I appreciate your assistance. :)
You don't have to 'simulate' this. That information comes from the attributes and smart comments you assign to a parameter. - /// <summary>
-
/// Max number of times checking the dongle can fail before quitting the app
-
/// </summary>
-
[Description("Maximum number of failures before we throw a failure event. Must be > 0"),
-
Category("Custom"),
-
DefaultValue(10),
-
Browsable(true)]
-
public int MaxFailures
-
{
-
get
-
{
-
return maxFail;
-
}
-
set
-
{
-
if (value > 0) maxFail = value;
-
}
-
}
-
XML comments in the /// will show up in Intelesense hothelp
Attributes in the [ ] will show up in designer properties remark area.
I suggest you try it this way.
First build the complete property or method. Then go one line above it and type ///
Intelesense will then stub in XML tags for description, parameters and return. All you have to do is complete the descriptions.
You can define your own attributes, or use the stock ones like 'Description'. http://msdn.microsoft.com/en-us/libr...attribute.aspx 5 3839
You don't have to 'simulate' this. That information comes from the attributes and smart comments you assign to a parameter. - /// <summary>
-
/// Max number of times checking the dongle can fail before quitting the app
-
/// </summary>
-
[Description("Maximum number of failures before we throw a failure event. Must be > 0"),
-
Category("Custom"),
-
DefaultValue(10),
-
Browsable(true)]
-
public int MaxFailures
-
{
-
get
-
{
-
return maxFail;
-
}
-
set
-
{
-
if (value > 0) maxFail = value;
-
}
-
}
-
XML comments in the /// will show up in Intelesense hothelp
Attributes in the [ ] will show up in designer properties remark area.
I suggest you try it this way.
First build the complete property or method. Then go one line above it and type ///
Intelesense will then stub in XML tags for description, parameters and return. All you have to do is complete the descriptions.
You can define your own attributes, or use the stock ones like 'Description'. http://msdn.microsoft.com/en-us/libr...attribute.aspx
Thanks for the help! I'm on the right track now. (I'm just working out the differences a little from your example which is some flavor of C, I think, to VB.) I really appreciate it. You've made my day!
GGoldenborne:
Can you show me how to do it, I still don't get it?
I don't understand the C example :-(
:-)
Arghhhh, GOT IT!
For others: You make XML comments in vb.net using '''
Example:
''' <summary>
''' This is a test comment
''' </summary>
''' <param name="Str1">Type in some text</param>
''' <param name="Str2">Type in some more text</param>
''' <returns></returns>
''' <remarks></remarks> Function TEST(ByVal Str1 As String, ByVal Str2 As String) As String Return Str1 And Str2 End Function
That's exactly correct, BeeBob12! Good work. :-)
Sign in to post your reply or Sign up for a free account.
Similar topics
by: peter |
last post by:
Hi all,
In VB.net,using Type.InvokeMember to call a method of
a class in COM dll,the method has a reference
parameter,It seems that there is no way to return the
changed value of that...
|
by: carl.barrett |
last post by:
Hi,
I have a number of buttons on a form which run mailmerges. Next to
each button is a text box/control that the user enters a date into when
the letter was created/merged. When the user...
|
by: Doug Eleveld |
last post by:
Hi Everyone,
I have been playing aroung with 'object-oriented' C for a while now
and I have come up with an interesting way to simulate C++ inheritance
and non-member functions in C in a 100%...
|
by: msnews.microsoft.com |
last post by:
How do I get Intellisense to open a dropdown list box for a method's
parameters when the parameter is an ENUM?
public class MyClass
{
public enum IDkind
{
PersonID,
EntityID,
PlaceID
|
by: YR |
last post by:
Hello,
I am tasked to write an application for a travel agency, that should be able to get a price for airline tickets from airline's website. Generally, airlines don't provide any web services...
|
by: CW |
last post by:
I have message entry screen that's causing me a bit of an issue. At the
moment, there are 2 buttons, one is used to send message to another user
(btnSend) and another is used to send messages to...
|
by: Rick Palmer |
last post by:
Hello all,
I have a function I have written that gets Invoices by a date range. It
looks something like this:
GetInvoicesbyDateRange(ByVal LBound as Date, ByVal UBound as Date, ByVal...
|
by: R Hedges |
last post by:
Hi there-I'm an AMATEUR VB.NET programmer, who has hacked
together a small VB.NET application that can get
information from remote machines using the
System.Management namespace. MY APPLICATION...
|
by: dancole42 |
last post by:
I have a form called CustomerLookup. It displays a DataSheet of all
our customers so that someone can quickly and easily view all our
customers.
When someone double clicks on one of the...
|
by: eBob.com |
last post by:
I have some code which is trying to determine where text will wrap in a
custom text box (which Inherits from Control). It determines the number of
characters which will fit in the first line, but...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
| |