Textbox - Create Arrays Of Strings To Hold The Names
Jun 3, 2012
I'm attempting to create a small app that allows a teacher to input 5 students with 5 test scores each. I need to create arrays of strings to hold the five students names, an array of five strings to hold each student�s letter grade, and five arrays of five single precision numbers to hold each students set of test scores.
[Code]...
View 3 Replies
ADVERTISEMENT
May 17, 2012
I'm making a random sentence generator that takes subjects, predicates, etc. from user input, stores them, and then randomly chooses one value from each category and prints it in a textbox. Or at least, that's how it's supposed to work. But I just can't seem to get the text to print in the textbox. Everything compiles fine, but when I click generate, Windows gives an error.
Since I have barely any time, for it is a project at an enrichment course that ends in 2 days, I've been trying everything I could without taking too long.[code]...
View 7 Replies
Oct 6, 2010
I'm trying to create a form that accepts names (or any strings) as input and stores them in a object. See attached form sample.Form Image:
Operations: ï Initially the NumericUpDown object on the form should be disabled.The user enters a value (string) in the textbox and clicks the Add button or presses the Enter key to activate that button.The application then stores that name in a List object, and displays the last entry in the Label underneath.The NumericUpDown should become enable after the first entry. The user should be able to move between all the values entered using NumericUpDown.
View 7 Replies
Nov 29, 2011
I like to create a Structure that could hold 'Yes' or 'No' only; just like a Boolean variable could hold True or False.
View 12 Replies
Mar 20, 2012
I want to create an array of an array (or arraylist of an arraylist) to hold strings.I want to fill an array1 with string values Then add this array to array2. - but only taking up 1 row in array2 e.g something like array2(index)=array1 Then clear array1 then loop through this again with different data, and add it to the array2.so will end up with something like
array2(0)... contains a collection of array1 data
array2(1)... contains a collection of different array1 data
.. and so on
i think i need to make new instances of array1 each loop, but not sure.I dont mind if it uses arrays, or arraylists, or lists, or structure of arrayslists?
View 6 Replies
Mar 4, 2010
I have a database table of company information.It's about 50 records and contains things like company id, company name, address, phone number, shipping rate1, shipping rate2,etc.I want to load that table into a structure that I can quickly search within my code.I want to search by id to find the company, and then use the company's data to update some records.My lazy way has always been to add a listbox for each piece of data, then do an indexof on the id, then access the same index on the other listboxes.[code]
View 6 Replies
Dec 18, 2010
Speed is critical in my application. As of now, I'm using an ArrayList to store a list of Strings and I use BinarySearch functionality of ArrayLists to search for an item. Would I be able to do this faster using String Collection and a for loop?
View 22 Replies
Mar 26, 2011
he program is using parallel arrays. The first array lists names, and the second array holds the gender of each person. "M" for males and "F" for female names, What i need the program to do is when the user click on either a Boys button and Girls button it will display the correct names into a listbox. for the love of me can not get the program to work correctly. The book, I guess, just does not give enough details
Public Class Form1
' Declare and initialize the name array
Dim strNames() As String = {"John", "Paul", "Mary", "Jane", "Peter", "Sam", "Andrew", _
[code].....
View 8 Replies
Jun 11, 2011
I'm currently taking a class in VB 2008, with that said I am working with strings and had a quick question. I need to add code to parse the name when the user enters a name and clicks the Parse Name button, this code should work whether the user enters a first, middle, and last name or just a first and last name, before I get decimated by everyone, I am not asking anyone to do my homework because I already have a working solution to this, my question is to see if there is a "cleaner" or more "efficient" way to code this.
[Code]...
View 2 Replies
Oct 29, 2009
I have two strings arrays
Dim sir1() As String = "m1-m2","m1-m3"
Dim sir2() As String = "1-0","0-0"
What I want is this output:
m1-m2 1-0
m1-m3 0-0
Which is the fast method to concatenate them?
I tried
Dim sir3() As String
sir3=sir1&sir2 but with no result
View 4 Replies
Mar 20, 2009
I have two strings arrays
Dim sir1() As String = "m1-m2","m1-m3"
Dim sir2() As String = "1-0","0-0"
[code].....
View 5 Replies
Apr 27, 2009
I have been summoned with the task of taking a tab delimited file and converting that file so it can be read by a third-party program. I am trying to think of the best way to do this, but I am having a hard time. Here is a view of the raw data that must be altered:
fkstoreidHeaderMarkB1RegNodateofbusinessNoRegEntriesTipsOverRingsVoids$Voids#NetSalesDP1_2GuestsDP3GuestsDP4GuestsDetailMarkfkdaypartidRecTypeGLB2Sales
1061HNULL101/01/2008NULLNULLNULL113.263512785.4714453137D2041005NULL2220.25
1061HNULL101/01/2008NULLNULLNULL113.263512785.4714453137D3041005NULL9170.19
1061HNULL101/01/2008NULLNULLNULL113.263512785.4714453137D4041005NULL670.75
[Code]...
I am toiling with the best way of doing this. So far, I am not having much luck. I have used arrays quite successfully in Java, but I am not sure that this is the best way to go here. I would have to get how many lines there are and read each line. Make the changes, and then go on to the next line. I think scanning the document line by line using a loop is the best way. However, I am not sure.
View 4 Replies
Jan 27, 2009
I was wondering if, perhaps, someone could help me understand why the following code gives me a garbled result? Instead of displaying as it should I get '.Net 2.0 Application Development Foundation Framework Microsoft'.[code]
View 2 Replies
Oct 6, 2008
I am in need of encrypting a byte array, but my encryption method that I found strictly deals with strings.
Here are the two pieces of code that I am dealing with.:
The byte array (the bytes that need to be sent encrypted)
Code:
Dim outStream As Byte() = System.Text.Encoding.ASCII.GetBytes(TextBox2.Text + "$")
serverStream.Write(outStream, 0, outStream.Length)
serverStream.Flush()
[Code]....
View 4 Replies
Apr 7, 2010
The problem I'm having is I'm not sure how to go about getting the correct ones into the correct arrays. The data is scattered throughout the file. They are not on the same line and some are multiple on a line as well as blank lines, however they are in pairs. As they are not separated by commas or just white space is there a way to load the first string to the first array and every other string to the second array
View 3 Replies
May 5, 2012
I was getting weird results when doing multiple splits on a string, so I decided to make a simple test to figure out what was going ontestString "1234567891011121314151617181920"If I wanted to get whats between 10 to 20 in Javascript I would do this:var results = testString.split("10")[1].split("20")[0]Which would return 111213141516171819However when I do this in VB I get 111Split(testString,"10")(1).Split("20")(0)It seems the 2nd split is only recognizing the first character no matter what I put.
View 3 Replies
Apr 5, 2010
I've never come across this before:I have a series of text boxes. The text of these boxes get set on page load. then I have a submit button that calls a sub to update the table with the new values (text) in the text box. The problem is it is keeping the original text not the text that is CURRENTLY in the textbox. Anyone come across this before? Or know how to get round it?
[Code]...
View 1 Replies
Aug 10, 2011
I want to store the contents of an XMl file into an array but struggling to work this out. I have managed to read the data in and store in labels as a test. I then created an array list and used a message box to display the data to see that it has been stored. It does but I am not sure how to group this data. There are 3 records in the file. the idea is to end up with the following:
[Code]...
View 10 Replies
Jan 8, 2009
i've to declare two constant arrays one bidemensional of strings the other bidimensional of Doubles?
View 10 Replies
Jul 20, 2010
The problem is, I've never created a class before, not in VB, Java, or anything. I know all the terms associated with classes, I understand at a high level how classes work no problem. But I suck at the actual details of making one.[code]...
As for the Getter and Setter, the reason I put the question marks in is because I want to return the whole array there. The class will eventually have other properties which are basically permutations of the same data, but this is the full set that I will use when I want to save it out or something. Now I want to return the whole Array, but typing "Return fullDataSet()" doesn't seem like a good idea. I mean, the name of the property is "fullDataSet()." It will just make some kind of loop. But there is no other data to return.
View 3 Replies
Sep 3, 2009
have been developing an application for quite some time now. I have decided to create an mdi parent form to hold all the windows I have done so far. Is there an easy way to implement the mdi parent/ child associations?
View 12 Replies
Mar 18, 2012
learning about Enum and trying to determine if it has the right methods for what I need:
[Code]....
View 2 Replies
Nov 17, 2010
How does the GC dispose objects created in the following 2 scenarios?
1)
Private Function DoSomething() As Boolean
Return New DatabaseManager().Insert()
End Function
2)
Private Function DoSomething() As Boolean
Dim mngr As New DatabaseManager()
Return mngr.Insert()
End Function
In Option 1, I don't create local variable to hold the reference of the object. In Option 2, I hold the reference in local variable.What option is better and why? (if any)
View 2 Replies
Jun 5, 2010
I am attempting to create a program for a business but i have no idea how to create a database to hold the information and allow me to access it when needed
View 1 Replies
Mar 8, 2012
How can I create a list (of my custom structure) to hold only unique items? This list should be created from another list.[code]...
View 5 Replies
Feb 1, 2010
I have written a simple program which receive data from serial port i.e (temperature) and display on a line graph. but i require accumlate the graph data upto 10 minutes on screen. after that it again accumlate next 10 minutes data.[code]....
View 1 Replies
Oct 16, 2009
Say I have a List(Of Tag) with Tag being an object. One member of Tag, Tag.Description, is a string, and I want to make a comma-separated concatenation of the Description members.Is there an easier way to do this than to read the Description members into a List(Of String) and then use the Join function?
View 2 Replies
Aug 2, 2009
I have a program that simply checks if the account number and pass word match. And if not it allows you to create it. But i have no idea on how to create something that will hold the data and will allow the user to add and remove sets of data.
View 1 Replies
May 28, 2011
How can I do the same as the following in VB.NET
List<T[]> result = new List<T[]>();
// single combination
if (k == 0)
{
result.Add(new T[0]); // T is function type argument of generic function How can I write the last line above in VB.NET?
I tried:
result.Add(New T(0)) 'doesn't work!
View 2 Replies
Jan 16, 2012
So I have to create a jukebox with 3 different arrays, and 3 push buttons. Basically it looks like this:[URL]..
[Code]...
View 7 Replies