im trying to make an example program for a teacher friend of mine
Springfield Toledo Youngstown
[Code]....
thats just what i have so far but im really having trouble getting the other part into a 2d array. i want the second half to look like this when done: the oppsite of what it looks like in the file.
Im extremely new to programming. Im trying to determine how to get values from 6 different text boxes put them into an Array. They are in a function not on the form. Three of those values need to be used for calculation.
-A button (called "btnplayvoice") -A textbox(multi-line enabled, called "txtinput") -Some *.wav audio files in my "resources" (2 of them called "A.wav" and "B.wav", of course there are still some more sound files in my resources xD)Note: the button and the txtbox are in the same form.
i want to make a program with this feature:When I type "B A"(note between "B" and "A" has a space)into txtinput, then i click the btnplayvoice, it will look up and check the resources and see if the wav file exists there, if yes, it will play the related(same as inputed) sound files one by one in correct order. That mean in this case I should hear "B.wav -> A.wav" in this order.
I am trying to complete a program that creates an array of the states that begin with New from an array with all 50 states. The code below is what I have so far and cannot seem to figure out what I am missing.[code]...
I wrote this do while loop it is supposed to search through an array until it finds an account number that matches. but I have a problem I cant check the very first part the array when its subscript is 0 because of where i put increment x but if i move it to the end it won't work how can i fix this?
Public Sub AccountNumberSearch(ByVal a() As Account, ByVal accnum As Integer, ByVal numacc As Integer) Dim x As Integer = 0
I'd like to know if it is possible to refer to section of an array. e.g.
dim a(10) as integer foo(<reference to array a starting at item 2>) 'only use items 2 to 9 of the array ... sub foo(byref a() as integer) <do something with array> end sub
Note that I don't want to copy the array to a new array or pass in indices, if I can avoid doing so. Subroutine foo should be able to process the array without knowing if it gets the whole array or just a section.
i'm trying to have a if statement that will take the users inputed value and if the value is greater then 8 it will take the greater amount and times it by 1.5 can't get my head around it, only just started studying Visual Basic so would be greatful for any help you could give me. Here's the code i've done so far on the if Statement,
I am working on an assignment where I need to have a product list that is loaded into a list box upon the form loading. This is generated from a txt file in the /debug folder upon loading. Now my question is how do I have the product names show up in the list box when there are 3 separate parts to each product. The product, the cost, and the quantity in inventory, and all I want to show up is the product in the listbox, where the rest show up elsewhere.
CODE:
'This procedure loads the data for the array from txt file. As well as loading the Product.txt file into the system when the program loads.
I am having some trouble with an array full of data which I am trying to process. The data has been picked out of an Excel spreadsheet and contains items such as phone numbers. The problem is that when I drop this array back into a spreadsheet, Excel being clever, decides that some of the phone numbers are numbers and removes the "+" from the front.[code]...
I know that adding a ' in front of the + will remedy this. What I need to do is find out which of the numbers in the array are actually numbers and which have spaces/characters in them. IS there a quick way of doing this without having to search through each individual character of each array position?
I'm trying to find the sum of all the digits that make up the number 2^1000, which you may have guessed is from Project Eula. I think it's good so far except I'm just learning about arrays and dynamic arrays, so how will I know what the size of the index will be so I can specify when the Do loop should stop so I don't get an indexoutofrange exception?
vb.net Dim BigNumber As Double = 2 ^ 1000 Dim DigitArray() As Char = BigNumber.ToString.ToCharArray Dim Index As Integer = 0 Dim SumOfDigits As Integer = 0 [Code] .....
I'm trying to make an application which will log me into a site and read the text of the site and display a certain part of that text in my form. I'm stuck at the login, its a .php page with 2 text boxes, 1 check box and 1 button.Is there any way to manipulate those objects by using controls in my form?
I'm trying to make a text ecrypter/decrypter were I can choose how it gets encrypted. So i'm using the 'Replace' method to replace a letter to a different letter. But what happens is, only some of the letters convert correctly! What some a doing is converting themselves twice. So if A gets replaced by B and B gets replaced by A, if i entered A, it would convert to B, then back to A.[code]...
Below is the code i am using for user input which works fine apart from one thing that i can not work out how to do.I want to detect if a user had inputed a character in the wrong place. The correct input is:
D:Folder name
The incorrect input is:
D:Folder name
How would i detect the extra '' at the end?
Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click Select Case Doc.Text Case "" MsgBox("Invalid Path")
Okay, this is more than just a find text and replace it. how to select only certain letters ( such as A and T will be used in this example ) and replace them with another. For example, I have a document that says:
Hello this is a test application. Thank you for testing!
and i save it, i want it to in a way to encrypt it, what do i mean? i mean like replace all the letters with other, then apply the opposite code for opening the file to "decrypt" it. Like what i would replace is something like change all the A's to T's. But the thing is i need to do this for all the letters. Im sure there are places on how to find and replace text, thats easy, but is there a way to do this in simple lines of codes without having to write a seperate code for all 26 letters?
I'm keeping track of some things that are numbered and others that are lettered; while NumericUpDown is perfect for selecting numbered things, I need an analogue for selecting lettered things. The obvious choice would be a listbox that just contains all the letters of the alphabet. But I need to show only the appropriate range of letters, so if I want to use a listbox, I need to write a function that populates the listbox with the first n letters of the alphabet; if n > 26, it should continue with aa, ab, and so on. How do I do this?
I am trying to program the hamming code in vb... theoretically i understand and know how to do everything, first problem I've encountered is dynamic arrays in vb.net ... is it possible to determine the length of an array from the number of items entered in it, since I have no means of figuring out an exact number or length prior to several mathematical function which outcome will be the data .. directly saved to the array !!
I so far have created a randomizer in Virtual Basic 2010 that:Takes people's names that the user imputed in form2 into an array (split by spaces).Randomizes the array Displays the array with a consecutive number and period behind it for each name that was imputed.
Here is the source code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim names() As String Dim i As Integer
[code]....
Pay attention to the last bit. I want to take the variable txt and split it. Then I want to take the first 10 names and display them in RichTextBox1, take the next 10 names and display them in RichTextBox2, and display the last 10 names in RichTextBox3.
how to make the values in a text box accepts only letters in the text box for data that are for letters only and numbers for data requiring numbers only
I'm currently writing a program which has a requirement to reassign drive letters if a drive with a particular volume name is plugged in to ensure that it is assigned to the correct drive letter.