InputBox to just accept numbers?

hughveal

New member
Joined
Oct 19, 2010
Messages
4
Location
Charlotte, NC
Programming Experience
1-3
I am in a class who has a prject due and I have a few questions to ask:
1) Is there a way to limit an InputBox to just accept numbers?
2) What control can I use to display 360 rows of data generated from a for loop?
 
1) I think it is possible to accept only numbers
you can also limit the length, the range,

2) List box also, but im having problem from selecting data in listbox
 
1. InputBox is a function. You pass some arguments in and it passes a result out. That's all you can do without going to lots of trouble. If you want to do something that InputBox doesn't provide an easy way to do then it would be far easier to create a custom form than to mess around with something that most experienced .NET developers recommend you should never use anyway.

2. It depends on what data you want to display and how you want to display it. For a single list of values then the ListBox is the easiest and generally the best option. For multi-column data you can use the ListView or the DataGridView. The ListView is generally more trouble and offers less functionality and flexibility than the DataGridView, unless you plan to display the data in other than Details view or you plan on using the ListView's grouping functionality. With the DataGridView, it's likely to be a single line of code to set up the columns and load the data.
 
Back
Top