VS 2008 Working With Arrays?
Jan 28, 2010
working with arrays is not something I am too good at,Currently I have a form with 2 text boxes and a single button. I have two arrays, one populated with user names, the other populated with password. The user names and passwords match up in position in each array. I am thinking I might need to create a multidementional array of these two arrays.
[Code]...
If I do this however, any user name gets matched to any password, pending both exist. I would like to be able to compare the user name and password of a single user. Right now the user names and passwords are stored in separate arrays. Should I merge the two into a single array? If so how? And if so how do I go about matching the text box entries to the array(s) and making sure that the user name and password matches?
View 12 Replies
ADVERTISEMENT
Aug 7, 2009
working with arrays in VB? I need to take data that is being sent in this form:
228 -7.605553000000000E-03, -1.006126000000000E-03
6.341457000000000E-03, 5.457878000000000E-03
-1.504898000000000E-03, -8.575439000000000E-03
and put that into:
a11 a12 a13 a14 a15 ... a1x
a21 a22 a23 a24 a25 ... a2x
ax1 ax2 ax3 ax4 ax5 ... axx
The data is being sent from a network analyzer.
View 18 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
Dec 4, 2009
How I can make control arrays like vb6? I need for example,
button(1).backcolor=...
button(2). backcolor=... etc.
And I wanna work with it's indexes.
View 4 Replies
Oct 30, 2010
the statement Dim state(49) As String and maintain a list of certain states. The list of states should always be in alphabetical order and occupy consecutive elements of the array. The buttons in the program should give the user the following options: (a) Take the state specified by the user in a text box and insert it into its proper position in the array. If the state is already in the array, so report. (b) Take the state specified by the user in a text box and delete it from the array. If the state is not in the array, so report. (c) Display the states in the array. "
Private Sub states_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
state(0) = "Alabama"
[code]....
View 1 Replies
Apr 8, 2012
Dim LabelArray(12) As Integer
LabelArray(0) = Label3.BackColor = Color.White
LabelArray(1) = Label4.BackColor = Color.White
[CODE]..................
i have made an array. first of all i want to make it global and on form load i wanna show it's first position and on a button' s click i want to increase it's position by one how can i do that
View 2 Replies
Jun 18, 2009
It appears that my favorite thing in the world is tackling projects that are beyond my current knowledge and abilities. I have a little project that I am working on which is a simple image viewer stocked with (upon completion) your standard Load..., Next/Previous, Zoom In/Out, Actual Size, and Full Screen capabilities. However, I am running into a few snags:
(1) I've been able to get my "Load..." button to display a file dialog box, but I cannot seem to get a working filter (with which only image file types are allowed to be selected) in working order.
(2) I have a PictureBox object (entitled PictureBox1) that displays the image selected via the file dialog box, but it loads images in their full size (1:1/100% zoomed) state without scrollbars, etc. to allow me to navigate the loaded image. I would like to have it load the image, initially, to fit within the dimensions of PictureBox1 and from there be able to zoom in/out via my "Zoom In/Out" and "Actual Size" buttons and be able to scroll if the zoom level is beyond the dimensions of PictureBox1.
(3) It dawned on me that I haven't the faintest idea how to get my "Next/Previous" buttons to allow the user (me) to navigate, in succession, the images contained in the folder in which the currently loaded image is stored. [code]
If it is deemed that this thread is inappropriately requesting help, I ask that it be locked/deleted quickly as I recognize that this is a large community with many discussions going without need of unwelcome posts.
View 9 Replies
May 9, 2010
In VB6 I load a recordset containg all of the records (6 fields per record)in a table into an XArray and then manipulate the records in the array and then write them back to the original table. The array issorted by the first field (1 to maybe 8000 or more) I need to find records in the array by an ID field and then move them (because of some external criteria that happens many times) from say number 400 to number 375. Then all of the other records between 375 and 399 were renumbered up 1 to fill the gaps left by the move.
The XArray worked well as it could find and also move to a next record easily to facilitate the revisions to each record quickly. Everything is done in VB6 in code and nothing visual needs to be shown to the user until say 2000 of these external changes are complete. What is the best, most efficient way to do this in the .Net framework in VB2010. Datasets, Dataviews. tableadapters, arrays. enums ?
View 3 Replies
Dec 10, 2009
My assignment is to have a user enter in big integers using what i think is two parallel arrays. I got this far but now im stuck. I think i need to actually convert the text box input into an array but i do not know how to do that. I am all over the place in this project.
'Created/ Revised by: Jessica Falcetta
'Cap 204 Final Project: Big Integer Project
'Project Purpose: To calculate large integers through parallel arrays
[CODE]...
View 5 Replies
Feb 2, 2010
I have a VB.net console app and I am opening a function in a dll written in fortran. I am passing 3 arrays through the function by reference. When they come back out the otherside they ahve all tunred to arrays of only one element And that element is 0.I read on the internet somewhere that when doing this kind of thing it is a good idea to only pass the first element of the array into the function.I tried changing my function declaration to accepting single elements rather than single dimensional arrays, and now the arrays are the same length before and after the function call, but they don't seem to be changing at all, so i'm not sure that this is working
View 1 Replies
Mar 14, 2010
I would be more that happy for someone to tell me I am missing something very simple here I am writing code that - amongst other things - talks to code on other servers using the tcpclient function in .net
What I want to do is - in essense very simply. I want to define a structure which includes an array load it with data and sent it to the other end of the socket.
[Code]...
View 4 Replies
Nov 17, 2009
I am having trouble figuring out how to use arrays effectively. I am trying to use them to store a data from text boxes and and then retrieve the data that's been stored.
View 15 Replies
Nov 6, 2009
I have a 2 dimensional array. Im trying to use it to generate a maze via some algorithms. Its pretty much way over my head though.But thats beside the point. If i need each array coordinate to store multiple values (like if south, west, north, east has walls), what would be a clever way to do so?
For instance:1, 1 in the array needs to keep track of 4 values at least (as do all other positions).
Should i make it an integer value like "1111" and replace with 0's where the wall is gone? the first 1 being north, second being east e.t.c. Would you choose this option?If someone wants to do a bit more research, here is some info on mazes:[URL]..
View 6 Replies
Apr 17, 2010
i have ReceivingArray(100, 1) and Function(1), what i want to do is ReceivingArray(x, ) = Function(1) so that goes here^-----------this but i cant figure out how to do that
View 7 Replies
Jun 17, 2011
I am getting records in my dataTable that have nullvalues and need to pass each of those through a function that gets the missing value. In this case my records are address's that are missing the "Latitude" and or "Longitude" Field
I need to be able to retrieve the values and place them in the missing column and row
Nulladdress
Public Function GetNullAddress() As Address()
Dim Addresss = (From row In dtsold.AsEnumerable() _
Where row.IsNull("Latitude") OrElse row.IsNull("Longitude") _
[Code]...
View 4 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
Apr 26, 2011
I'm working on a program for a class of mine but the ideas of arrays from a textfile just doesn't seem to click.
When the program loads, it should display the title of 17 books from the textfile.After, the user should be able to click a book title in the ListBox then click Compute Inventory to display the information below, which should be obtained from the textfile.
View 7 Replies
Feb 21, 2010
I have been given an assignment which is to program a working payroll system in Visual Basic 2008.I have done most of it but I am stuck at the arrays.I would like my system to store all the staff name that the user adds on the system into a single Array for example in EmployeeNames(50). For example if the user enters a new staff in the textbox name and confirms it by clicking on a button, I would like that staff name to be stored into my Array EmployeeNames(50).
View 1 Replies
Jul 3, 2009
I'm trying to combine two arrays. Simply append 1 array to another. I have two string arrays. Lets just say array1 and array2.would the following be correct?
array1.Copy(array1, array2, UBound(array1)) I guess I'm slightly confused about the parameters. When I try to use the above code I get green squigglies with the following error.Access of shared member, constant member, enum member or nested type through an instance; qualifying expression will not be evaluated.
View 2 Replies
Aug 14, 2011
Say you have a Combo Box with a List of Months in it.When a Month is Selected, the number of days in the Month is displayed in a nearby Text Box.
View 1 Replies
Jul 28, 2011
I am working on arrays but i need to do a sql update statement. Contents of the array are also part a primary key in my table.How do I do an update using the array for example if my array is room names and my other table values are start date, end date and campus ID.
View 5 Replies
Aug 2, 2009
I'm wondering what the proper way to remove an item from an array is. The way i am doing it at the moment is:MyArray(0) = NothingIs this the best way to do it as i'm having problems with my programme and i think it may be something to do with this
View 10 Replies
Jun 11, 2010
I am having some major problems with byte arrays. First off the bigger array I have the more values go missing, I originally wanted to make a huge array and just dump like a 100mb chunk of memory in it but when I did that every byte in the array returned 0. So I experimented a bit and found 4kb to be the biggest chunk size to reliably not return 0.. ok I figured I'll just loop the 4kb and glue them back together later but no such luck, after being combined into the main array the bigger the number gets the more values that should be there just aren't.
Here's a code sample:
Dim retval(4095) As Byte
Dim combval(RLen) As Byte
For i = 0 To RLen - 4095 Step 4096
ReadProcessMemory(ProcAccess, i, retval, 4096, 0)
retval.CopyTo(combval, i)
Next i
WriteLine(combval(321603964))
WriteLine(ReadMemory(321603964, 1)(0))
So with the last 2 lines if I pull up some smaller number like 8 digits or so it reports back no problem but anything slightly bigger like the number i have written in there right now is just 0. After some additional research I discovered that the reason why 4kb is the max size I can reliably get is coz that's the size memory chunks are made of, "page" as they call it. Why the memory reading drops off at higher addresses alltho I suspect it has something to do with the way memory is structured and I am just not hitting the startpoint of a page anymore due to an offset or something somewhere.
View 3 Replies
Jun 15, 2010
I've got a multidimensional array set up like this:
[Code]...
What I want to do, is use a for each loop to add the strings of the array into a ComboBox.
View 25 Replies
Aug 21, 2010
I have been trying to join multiple multidimensional arrays but with no luck. I basically have three two-dimensional arrays as following:
[Code]...
View 5 Replies
May 14, 2010
I am trying to create a array that holds a series of arrays.A holds X amount of array.so I thought I could declare dim A(howmanyIwant)(3) as String however that does not seem to work.How many arrays A has to hold depends on a parameter.So how is it really done?In the end I would like the result:
A(0)(0) = 1
A(0)(1) = 2
A(0)(2) = 3
A(1)(0) = 1
A(1)(1) = 2
A(1)(2) = 3
View 1 Replies
Feb 16, 2009
i am currently running a program that will allow me to save all data on the form to open and edit at will. It uses a structure of 8 arrays, each with 16 values to save the information.
When i try to save the text into the array, it tells me that its a bad record length and crashes.
Here is the
Public Structure save_weekly
<VBFixedString(8)> Public dates() As String
<VBFixedString(30)> Public description() As String
[Code].....
View 4 Replies
May 3, 2010
I was wondering if anyone knows a built in method ( LINQ say or a LAMBDA expression or other way ) that you can compare2 arrays - collections that would be valid for an equivalent 3rd array - collection which is a combination of the 1st two.
As an example consider;
* * *
A L E
[code].....
View 17 Replies
Oct 13, 2009
How can I sort three arrays so they are sorted together (the other two arrays are in sync with the first)?unsorted unsorted unsortedarray1]CODE]....
View 9 Replies
Feb 21, 2010
I'm looking at controlling properties of an array of buttons in VB 2008 (express). I have been looking at the sample code from a whitepaper at MS, and it kind of makes my head spin compared to what was done in VB6! (and yes I'm an amateur
[Code]...
View 1 Replies