I am currently dealing with a problem of saving an arraylist for a Client List for a company. This is what i have:I need to save the settings of the clients, so that when the program is closed and opened back, it will have the same list of people with the same information. I also need it to save the data as it is deleted from the list.
I have been trying to get this to work for the past hour, I have an arraylist that contains string() items inside of it, I want to be able to save it and retrieve it.. When I try to save something to it and then close my application and turn it back on, everything I saved is gone.
I have a web browser with thumbnails on the homepage of recently viewed sites. I can't figure out how to save the images without saving them to a files. I want to save them to either resource files or a setting file;but i can't find a setting type that supports images!
I know this is a VB.Net messageboard, but it can work with in all languages. Is there a quick way to complete a line (sample code): //Setting variables set 1 a = e; b = f; c = g; d = h; .....
//Saving changes set 2 e = a; f = b; g = c; h = d; without having to type everything out...A technique using EXCEL or Notepad....Find and Replace. This would save a lot of time coding and becomes pain in the butt when you working with many variables.
I have several forms that have a DataGridView object in them. I recently discovered the AllowUserToOrderColumns attribute. I set it to true and I can reorder the columns at will. The problem is that the order for these columns is lost once the form is closed. Ok, how do you save the order for these columns and then restore them to the form once it has been reopened?
I am trying to make a program that allows me to operate a program while I am not around (kind of like a bot) because I need to move alot of things and do the same motion over and over.
So in my program's settings I have made a form that is transparent that I want to set my working area with (i wont be resizing the form, it's size is "975, 575") and save the forms Top, Left, Bottom, Right positions so I can create a macro for my mouse to click.
how to save a forms position on the screen? So I can use it to set a working area?
I just want to save its current location to 4 variables
What I am doing is iterating through all the groups that belong to the top group (Generic reports). Then I take advantage of the GroupPrincipal.GetMembers(True) which will recurse through a given group name. I test to see if the user exits under that group and if true I put the group name in an arraylist.
I use the for each principal in GroupPrincipal.GetMembers to loop through each returned user to see if they exist.
Is there a way to put all the returned users Principal.Name from a given group in GroupPrincipal.GetMembers into an ArrayList? This would allow me to to use Arraylist1.IndexOf to search for user. Which would be much faster then iterating through a returned list using the for each construct.
Sub RetAllMbrs(strUser As String) Dim oPC As PrincipalContext = GetPrincipalContext() '<- this is function somewhere else in the code
I have an arraylist (arrFirstArry) which I use to populate another arraylist (arrNoDuplicates) preventing any duplicates from being added. This works fine. What I would also like my code to do is prevent adding any partial values which may exist from being added. i.e. my array is like this
I have two structures Public Structure myResearchData
Public batchName As String Public arraylistRData As ArrayList End Structure Public Structure myResearchSubData Public researchDescription As String
[Code]...
Cleared MyResearchData.arraylistRData for new data to be put in but it also clears the arraylist inside MyResearchDataAList and didn't old the contents of the arraylist
What I need to do is read an ArrayList in My.Settings and add another ArrayList to it. The first think I'm trying to do is load My.Settings.Records into myArrayList. I'm not quite sure on the proper way to do this. I've tried things such as Dim myArrayList As ArrayList = My.Settings.Records, I'm not sure if I need New and I'm not sure if I need .Clone or .CopyTo.
Then I have another ArrayList myArrayList2. To get this into myArrayList I've done: [Code] Then to save it back to My.Settings I've done. My.Settings.Records = myArrayList. The problem is I keep on getting Object reference not set to an instance of an object error on the AddRange line. My.Settings.Records is definitely an ArrayList and it will sometimes = Nothing. The objects will only ever be strings.
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?
s there a difference between the arraylist in visual basic and arraylist in C#? I had to convert some C# code to VB and there is a call I make in a third party api that requires me to pass in an arraylist. When I do this in C# it works just fine, but when I do this in VB, I just get back a vaque exception from the api.
[Code]...
The exception I get is very vague and comes from the API. All i get is, "ARException Occured".
I need help and wondering if you can help me to get my first project...it's a hobby and wondering if you can get me code for this so i can see how it does it* Evaluate( ) Prints the evaluation of the hand to the evaluation Label.
o If IsFlush( ), prints "flush; " o calls SetPipArray( ) o Uses a For Loop to go through pipArray. For each element, uses a Select Case statement to
In our projects we use setting variables to store user setting for the applications. Moreover, with every latest version of the applications, we upgrade these variables to retain user settings.Normally, this works fine, but recently one of my end user reported an error i.e.Configuration System failed to initialize". The error is related to user.config file. Therefore we requested the user to send us his file.After received the folder, we noticed that it contains 3 files (3begfjb.newcfg,3begfjb.tmp and user. config). 3begfjb.tmp is an empty file, while 3begfjb.newcfg and user.config are identical files. We tried to open these files but the data in user.config isn't proper xml rather its unreadable formatted file.Do any you guys had experienced this sort of issue or any ideas how and what may have created these files and corrupted user.config file.
Currently I am saving data from my applications by saving a text file via a stream reader as a string. I have come to a problem. In my current application, I have an array of the following structure:
I have a problem. I'm working on this advanced web browser with my friend, and we made a favorites feature. So, it works and all that, but, after I close the executable file, it doesn't save anything!
Ex:Starting Up, adding Google as new favorites, then closing the browser. Starting up again, 1 hour later, but there's no Google Here's what I put for saving the favorites (please do not steal the code Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
rewriting a class I use for saving Treeview data to a XML file for use of saving ListView data I can't really figure out the rewrite, I'm stucked, unfortunately Listviews seems to be a big problem for me in general.
Option Strict On
''' <summary> ''' The TreeViewDataAccess class allows the nodes within a TreeView to be ''' persisted to xml for later retrevial. ''' </summary>
I am trying to make a little program for fun and I don't know OOP that well. Since this part of the program is going to be large in comparison to everything else, I want to make sure I don't half ass it.
I need, 50 states each state having multiple schools each school having multiple players and each school having 1-4 coaches who may or may not have awards
I only posted a couple classes since I should be able to figure the rest out off of these two. The award class properties will be changed later. How do I make a new coach that has x awards? I am confused with this part. If I did not explain something clearly please let me know, I want to make sure I get this program started off the right way.
Public Class Coach Public Sub Main() Dim coach As ArrayList = New ArrayList ' coach.Add(New Coach(1, "Billy", "Bob", 0, 50, ???)) End Sub
I'm having some trouble adding an object to an arraylist.
Basically the object has two properties (file id/name), but I can't figure out how to assign those properties. During runtime it errors out with public member on the object not found.
Private QueueList As New ArrayList Public Sub Queue(ByVal FileName As String, ByVal FileID As Integer) Dim QueueObj As New Object
[Code]....
I'd also like to know how I can do a loop on the arraylist and access the two properites on each record.
I am trying to create an arrayList of people. The variables, or arrays are; first name, last name, age, DOB. I am wanting to load all that into one arrayList and dataBind it so it would look like [code] Loading it into an ASP DataList. SO Fname + Lname + age + DOB are loaded on the same line/index. Not sure how to go about this. I'm sure it's an index issue..but not sure the thought process to even begin to load these elements into the "0" element, then the "1" and so on. Not puling the information from a database, just preset arrays/arrayList. ANY suggestions? ( I have it so it is dataBound to one arrayList entry as in [code] This works fine. But if I wanted to add the last name to the first name on the same line...that's were I am not seeing the connection.
I have an 2-d arraylist with 2 fixed columns and dynamic rows. The arraylist will be assigned to the session variable at the end of the code below. My question is how can loop thorugh the arraylist from the session to get its value?
If .SQLDS.Tables(.sSQLDSTbl).Rows.Count > 0 Then Dim NoOfAdjType(1, .SQLDS.Tables(.sSQLDSTbl).Rows.Count - 1) For iRow As Integer = 0 To .SQLDS.Tables(.sSQLDSTbl).Rows.Count - 1
Not quite sure how to attack this one. If I have an array list how would I go about elminating duplicates but adding the values of those items together. In other words if I have one item that has a id of 9000 and a quantity of 5 and another item that has the same id of 9000 and a quantity of 10. How would I eliminate the duplicate but add the quantities
Lets say my ArrayList got 20 elements. Well, sometime in runtime I will want it to only have 10 elements, so the other 10 indexes(from 9 to 19) don't exist at all. How do I do that?
Dim iArr As Array For Each iArr In m_alTabell 'ReDim myArr(16, 11) If i dim iArr(0,0) as string I could do this.ii = ii + 1 iArr(i, constanter.colNames.colValue) =m_objList.GroupItems.Item(ii).ListItems(i).Value'm_alTabell.RemoveAt(ii - 1)'m_alTabell.Add(iArr)
[Code]...
I have a problem with this code. m_alTabell constists of 10 twodimensional arrays. I have some data in them from the beginning. Now I want to add data in each iArr in a_alTabell. This works fine on the first one. But then the trouble starts. It just keeps overwriting the first iArr in m_alTabell. So if i could redim iArr it would solve the problem but i cant do that course it needs to be declared as Array and not "Dim iArr(0,0) as string" since that couses other problems.
how to achieve what am trying to do below. am trying to have a set of numbers in different list into and array. so i can select any list in the array as random and get the values in the selected list.
Dim list1 as New List(Of Object) Dim list2 as New List(Of Object) 'adding items to list 1
I've been trying to solve it for more than a week, but I need help on putting an arraylist inside a listbox.
That's what the GUI should look like in the end, all the information has to be saved in an arraylist; I should be able to add a new customer; click on a customer entry to edit it.
Dim allelementds As HtmlElementCollection = MbFacebookBrowser.Document.GetElementsByTagName("span") For Each DD As HtmlElement In allelementds If DD.OuterHtml.Contains("resource") Then TlsResourceComboBox.Items.Add(DD.GetAttribute("InnerText"))
[code]....
As you can see im currently using a combobox as a type of a list which uses index to give certain labels their text I know that there are only 4 indexes when getting the inner text so how can put those 4 indexes into a sort of list without me using a Combobox?