Moving Lines Between Lists?
May 16, 2011
how I would be able to move a line from one list box to another?
What I need to do is read a text file, populate the lines in list boxes (automatically sorting them by set groups, defined in the text file).
Then I want to move the names between the boxes to my desire, the hit save and it will write them all back into the same text file.
View 2 Replies
ADVERTISEMENT
Oct 27, 2011
I want to go back to the input line in the four places in the code that say something like strinputmessage = strnegative or strinputmessage = strnonnumeric.I need to be able to go back to where you input the data so that the index does not increase.I tried using a GoTo <23> to go back up to the line i needed but then it gave me all these weird errors about the End and Next were missing.[code]
View 3 Replies
Apr 23, 2011
I'm doing a maze using VB10. its about moving a PictureBox between LineShape lines using buttons to move it. the problem is, can I make the picture not to move through the LineShape? if so how? or should I use something else other than the LineShape and another question can i save the progress of the maze and come back to it later? if so does it require using a database to save the location of the PictureBox?
View 3 Replies
Apr 1, 2011
I have two lists. One list is a list of names, the other list is a list of how many times each name is found in the first list noted in the database
so...
Nick
John
Jim
Jack
is the firs tlist
10
13
13
2
is the second list. Nick had 10, john 13 and so on.I want to sort the second list from large to small, but have the index for the first list still linked to the correct amount of calls.i do it this way so I can
for x = 0 to num_of_names
string = lst_name(x) & "-" & lst_count(x)
next x
View 3 Replies
May 20, 2010
I know how to check whether an item exists in a list using (MyList.Contains), But I do not know how to check the whole list. For example (use one button and one richtextbox):
[Code]...
View 14 Replies
Oct 5, 2008
I have this:
Private m_PerformanceCounter As New _
System.Diagnostics.PerformanceCounter( _
"Processor", "% Processor Time", "_Total")
[code]......
View 4 Replies
Sep 3, 2009
how to count the lines in textbox1.text (with multiplelines). I don't need to count each character. I only need to count each line from top to bottom in textbox1.text (multiplelines) and I will use Label1 to display the numbers.
example:
1-pauljaones
2-tommyperrry
3-marktoms
4-Jonessmith
5-paulwhite
Obviously this is 5 lines and that's what I need to count.
View 12 Replies
Jun 22, 2010
I have written a simple script to get a bunch of lines from a text file (they will be filenames eventually) which are split by new lines and puts each one into an array..
Dim ary() As String
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If My.Computer.FileSystem.FileExists("C:MenuFiles.txt") Then
[code]....
The only thing I can do for now is either use the substring function to remove the first character from all array values after 0 but I don't like that because it's messy and what if the split "works" as I want it to one one of the lines and knocks of the first character when I don't want it to.
View 1 Replies
Mar 17, 2012
below are a few lines from my text file(10929 lines)I need to read each line and insert into MS Access. each line is a column in my table and the record changes on every 8th line or to be more specific(on every 8th line you will see a number [1,2,3,4,5,6,7,8,9.....] this is where another record starts,
[Code]...
View 15 Replies
Aug 26, 2011
I want to draw string in multiple lines and and I want to know how many lines given string will take. I am using following method.
[Code]...
View 1 Replies
Aug 3, 2009
I am trying to make a script to spit command lines to a bat file to compress a bunch of files singly and then delete the original ones. I am sure that is easy to most of you, but I living a ____ trying to do this. A have a file list like this one belo, which was created with a command -- Dir /b /s /a-D N: > filelist.txt
[Code]...
View 2 Replies
Oct 20, 2009
read lines in a file, split the lines and spit the result to another file
View 2 Replies
Jul 24, 2010
I would like to loop through two lists using a For each loop.
dim data as list(of pointpairlist)
For each recLine in records
For Each chan In recLine.channels and d in data
d.add( func(chan) )
Next
next
Note: each record line has one sample from each channel recorded. i.e. each record line is a slice of a 32 sensor recordings. I want to build up a x,y list of data points for each channel (the x axis is common to all channels). Is there some way to do it similar to what I have above (avoiding indexing variables).
View 2 Replies
May 13, 2011
I'm trying to populate one list from another. I would think this code should work, but at the end of the day I get a list of identical items.
Public Sub WriteDatFile(ByRef lstReasons As System.Collections.Generic.List(Of LetterReason))
Dim tmplstReason As New TCPService.LetterReason
[Code]....
View 2 Replies
Jun 6, 2011
I'm very new to programing and am having problems trying to perform some calculations with a list. I have read in an array into a list with a count attached to each item example: "xxxxxx(intcount)". What I'm trying to do it use two xxxxxx(intcount)'s at xxxxxx(intcount+5) and xxxxxx(intcount+25) and use these two variables to calculate yyyyyy(intcount) but it isn't working. I understand this may be a stupid question but could someone please point me in the right direction.
View 6 Replies
Mar 20, 2011
Ok this is a hw assignment like always....just not sure on how to do the math on this form...the constants are declared for the registration fees and i did the same for the required days at each work shop i just need to find a way to multiply the days required at each workshop by the lodging fees. but i also need to display the lists of costs so its pretty complicated.
View 6 Replies
Mar 2, 2011
I have a method where I'm taking a generic object and using TypeOf to check what has been passed through. Now I would like to pass it a List(Of T) (T being anything) and no matter what T is I'd like to do the same thing to this list. I tried the following:
public sub foo(ByVal obj As Object)
if TypeOf obj Is List(Of Object) Then
'do stuff
end if
end sub
but this doesn't seem to work if I pass it List(Of String), say. I suppose that List(Of Object) and List(Of String) are being treated as different objects, but I thought that since String is an object, the comparision might work.
Now I realise that this is as ugly as sin and I'm better off overloading the method to take List(Of T) as its parameter, but I'm mostly asking out of curiosity: is there a way of comparing the types List(Of Object1) and List(Of Object2) and getting a positive result, since they are both just List(Of T)?
View 3 Replies
Feb 17, 2011
Compare differences between lists?I have two sets of lists below[code]...
View 1 Replies
Dec 17, 2009
I'm creating <!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:1; mso-generic-font-family:roman; mso-font-format:other; mso-font-pitch:variable; mso-font-signature:0 0 0 0 0 0;} @font-face {font-
[code].....
View 2 Replies
May 31, 2012
Right now I have a viewmodel that contains three lists of inputs; textboxinput, dropdownlistinput, and checkboxinput. Each of these lists is a list of input objects, which contain four values; paramenums, paramname, paramtype, and value. I am using these input lists to generate a variable number of fields on a form dependent on how many objects each list contains.
My current problem is that I'm not sure how to validate the variables in the list objects with fluent validation. I know how the behavior of each list should behave with regards to returning Nothing, but I don't know how to code that behavior with FluentValidation.
[Code]...
The thing I want to currently do is confirm that in every object in each of my lists, they all have a value attribute that isn't nothing. Can I do this by validating the input model? Right now, the code works at confirming that the list itself isn't null, but the objects in the list can still contain all null values. Is there a trivial way to do this? Alternatively, should I have set my code up differently?
View 1 Replies
Aug 27, 2011
<a href="http://www.websitename.com/Name" data-hovercard="/ajax/hovercard/user.php?id=100054545">Name</a>
how to grab, and lists all into a listbox?
View 1 Replies
Apr 12, 2011
I have referred to the following question at: Using foreach loop to iterate through two lists. My question is this, with regards to the chosen answer: Can the o.DoSomething be a comparison? As in:
For Each a in ListA.Concat(ListB)
If(a from ListA=a from ListB) Then
Do Something here
End If
Next
I'm using VB.Net and would like to know how I can do what I have shown here. That would basically be to iterate through a joined list separately/independently.
View 4 Replies
Jan 17, 2010
Is the size of Lists cached in some way (calculated the first time you call it, and then retained untill some change is made to it), or does it get calculated every time you call the Count property? Same question for arrays.
View 11 Replies
Sep 1, 2009
Can a list class in vb.net contain Data Structures ?
View 1 Replies
Jun 9, 2011
I have two Lists of custom objects:
List1: Year, Month, ValueA
List2: Year, Month, ValueB
I want to get a third List with a merge between the two:
List3: Year, Month, ValueA, ValueB
Is there any elegant way to perform that in LINQ VB.Net?
Example:
List1:
2010 - 6 - 2
2010 - 7 - 5
[Code].....
View 1 Replies
Apr 5, 2011
I am fairly new to VB (have done some VB in excell, but its a bit different)
I have a couple of questions:
1) How do I populate a dropdown list from a Database Row 2?
2) When I create a Database from Acess, where do I save the database? and If I build the exe program later on, will it include the database, or how does it work? I feel completely stupid, but one of the best ways to learn is to try over and over again
View 2 Replies
Oct 23, 2011
I have 3 CheckListBoxes, and I want to save all of their "checked" states. I tried to change the code to save and load one to work for three, and this is what I came up with:
vb
Private Sub savechxlst()
Dim FileStream As New System.IO.FileStream("C:CheckedListBoxData.cld", IO.FileMode.Create)
[Code]....
Unfortunately, all this does is combine all of the checkboxes into one list (ChxLstSym), and leave the other lists (ChxLstAud and ChxLstEx) completely blank. By this I mean ChxLstSym ends up having 15 checkboxes instead of each of the 3 Lists having 5 checkboxes (Which is how it was before I saved and Loaded), though it does remember which boxes were checked originally.
Is there a way to fix this so that I can save and load the checked states for all three of the checklistboxes (ChxLstSym, ChxLstAud, and ChxLstEx) so that they are all in their own lists upon loading them?
View 5 Replies
Sep 14, 2011
I have a program that takes some data from a Dictionary object, runs a batch process on it and then puts the output into a second Dictionary. The issue that I'm having is that the batch process can only handle 1000 records at a time and sometimes the list is larger than that. Right now, I'm looping through the Dictionary, taking records 1 to 1000 and putting them into a Dictionaryof the same type to process, running the batch, looping through the results to add them to the second Dictionaryand then starting the loops again at record 1001.
Is there a more efficient way to do this to pull out the first 1000 records into another Dictionaryand then batch insert the results into the output Dictionary? It seems like the kind of thing there'd be a function for, but I'm not sure how to do it.
View 1 Replies
Jun 24, 2011
I have been assigned a program for homework in which I need to take in information about songs from a text file and then be able to sort the list alphabetically, by genre and by length. I also need to be able to filter it by genre. The user can then move songs they choose from the master list to a playlist where again the list can be sorted by either genre or play order.My book only covered sorting array when they are one dimensional however I need to be able to sort a multidimensional array by different columns. I asked my teacher but she had so much going on that we didn't really have time to get into it, so I decided to ask here.
I'm not looking for code, just to get pointed in the right direction. For instance rather than using a multidimensional array would it be better to pull the values in and then put them into an array of song objects with properties for each value? And if I choose to go that route is an array the best structure to use? I have to use an array of some type, but the problem says nothing about whether or not it can be a list or other array type structure.
View 6 Replies
Oct 19, 2011
I have the following function that combines objects based on their gameScore attribute [code]NOTE the function is in a different class than where I have the lists I'm giving it..I had to set all the game positions blank because it saw an object with the same ID but different position as a different object. I didn't realize that even though I passed in the list ByVal the code deletes the courses on the original list somehow.First I input the origonal list expecting it not to be altered and put the output as a new list.[code]Yet somehow even the last one deletes the gamePosition attribute on listGames BUT *Doesn't* do the sum funtion for them, why is this happening it doesn't make any sense, it shouldn't touch listGames
View 7 Replies